aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/event_analyzing_sample.py
diff options
context:
space:
mode:
authorAlex Williamson <[email protected]>2025-02-18 22:22:05 +0000
committerAlex Williamson <[email protected]>2025-02-27 18:55:54 +0000
commit62fb8adc43afad5fa1c9cadc6f3a8e9fb72af194 (patch)
treecd05cf84cfb8eb48ea77606a747110ece1d05ee7 /tools/perf/scripts/python/event_analyzing_sample.py
parentvfio/type1: Use consistent types for page counts (diff)
downloadkernel-62fb8adc43afad5fa1c9cadc6f3a8e9fb72af194.tar.gz
kernel-62fb8adc43afad5fa1c9cadc6f3a8e9fb72af194.zip
mm: Provide address mask in struct follow_pfnmap_args
follow_pfnmap_start() walks the page table for a given address and fills out the struct follow_pfnmap_args in pfnmap_args_setup(). The address mask of the page table level is already provided to this latter function for calculating the pfn. This address mask can also be useful for the caller to determine the extent of the contiguous mapping. For example, vfio-pci now supports huge_fault for pfnmaps and is able to insert pud and pmd mappings. When we DMA map these pfnmaps, ex. PCI MMIO BARs, we iterate follow_pfnmap_start() to get each pfn to test for a contiguous pfn range. Providing the mapping address mask allows us to skip the extent of the mapping level. Assuming a 1GB pud level and 4KB page size, iterations are reduced by a factor of 256K. In wall clock time, mapping a 32GB PCI BAR is reduced from ~1s to <1ms. Cc: Andrew Morton <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: [email protected] Reviewed-by: Peter Xu <[email protected]> Reviewed-by: Mitchell Augustin <[email protected]> Tested-by: Mitchell Augustin <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Acked-by: David Hildenbrand <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions