diff options
author | Brett Creeley <brett.creeley@amd.com> | 2023-11-17 03:12:03 +0300 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2023-12-05 00:33:20 +0300 |
commit | 3b8f7a24d1fe79cc3fa1da9be5610b9c3aedbc2a (patch) | |
tree | 2b95fa669f53736af75d423c81f2915875680d7e /drivers/vfio/pci/pds/dirty.h | |
parent | 4004497cec3093d7b0087bc70709b45969fa07b6 (diff) | |
download | linux-3b8f7a24d1fe79cc3fa1da9be5610b9c3aedbc2a.tar.xz |
vfio/pds: Only use a single SGL for both seq and ack
Since the seq/ack operations never happen in parallel there
is no need for multiple scatter gather lists per region.
The current implementation is wasting memory. Fix this by
only using a single scatter-gather list for both the seq
and ack operations.
Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Link: https://lore.kernel.org/r/20231117001207.2793-3-brett.creeley@amd.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/pci/pds/dirty.h')
-rw-r--r-- | drivers/vfio/pci/pds/dirty.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/vfio/pci/pds/dirty.h b/drivers/vfio/pci/pds/dirty.h index f78da25d75ca..9de5aac58190 100644 --- a/drivers/vfio/pci/pds/dirty.h +++ b/drivers/vfio/pci/pds/dirty.h @@ -7,9 +7,6 @@ struct pds_vfio_bmp_info { unsigned long *bmp; u32 bmp_bytes; - struct pds_lm_sg_elem *sgl; - dma_addr_t sgl_addr; - u16 num_sge; }; struct pds_vfio_dirty { @@ -18,6 +15,9 @@ struct pds_vfio_dirty { u64 region_size; u64 region_start; u64 region_page_size; + struct pds_lm_sg_elem *sgl; + dma_addr_t sgl_addr; + u16 num_sge; bool is_enabled; }; |