1. 26 Jul, 2022 1 commit
    • Logan Gunthorpe's avatar
      lib/scatterlist: add flag for indicating P2PDMA segments in an SGL · 42399301
      Logan Gunthorpe authored
      Introduce a dma_flags field in struct scatterlist. These flags will be
      used by dma_[un]map_sg_p2pdma() to determine when a given SGL segments
      dma_address points to a PCI bus address. dma_unmap_sg_p2pdma() will need
      to perform different cleanup when a segment is marked as a bus address.
      
      The dma_flags field will fit in the existing padding on 64BIT systems
      (assuming CONFIG_NEED_SG_DMA_LENGTH is also set).
      
      The new bit will only be used when CONFIG_PCI_P2PDMA is set; this means
      PCI P2PDMA will require CONFIG_64BIT. This should be acceptable as the
      majority of P2PDMA use cases are restricted to newer root complexes and
      roughly require the extra address space for memory BARs used in the
      transactions.
      Signed-off-by: default avatarLogan Gunthorpe <logang@deltatee.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      42399301
  2. 22 Jul, 2022 3 commits
  3. 19 Jul, 2022 6 commits
  4. 18 Jul, 2022 5 commits
  5. 13 Jul, 2022 1 commit
    • Tianyu Lan's avatar
      swiotlb: split up the global swiotlb lock · 20347fca
      Tianyu Lan authored
      Traditionally swiotlb was not performance critical because it was only
      used for slow devices. But in some setups, like TDX/SEV confidential
      guests, all IO has to go through swiotlb. Currently swiotlb only has a
      single lock. Under high IO load with multiple CPUs this can lead to
      significat lock contention on the swiotlb lock.
      
      This patch splits the swiotlb bounce buffer pool into individual areas
      which have their own lock. Each CPU tries to allocate in its own area
      first. Only if that fails does it search other areas. On freeing the
      allocation is freed into the area where the memory was originally
      allocated from.
      
      Area number can be set via swiotlb kernel parameter and is default
      to be possible cpu number. If possible cpu number is not power of
      2, area number will be round up to the next power of 2.
      
      This idea from Andi Kleen patch(https://github.com/intel/tdx/commit/
      4529b5784c141782c72ec9bd9a92df2b68cb7d45).
      Based-on-idea-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarTianyu Lan <Tianyu.Lan@microsoft.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      20347fca
  6. 12 Jul, 2022 1 commit
  7. 07 Jul, 2022 10 commits
  8. 22 Jun, 2022 4 commits
  9. 19 Jun, 2022 9 commits