diff options
| author | Vivek Kasireddy <[email protected]> | 2024-06-23 23:36:14 -0700 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-07-12 15:52:10 -0700 |
| commit | 0c8b91ef5100eaed3d64123ac91ac4739fccf15c (patch) | |
| tree | 8013ea8f8b073f22408f508d8802870580515815 /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | 7d79cd784470395539bda91bf0b3505ff5b2ab6d (diff) | |
udmabuf: add back support for mapping hugetlb pages
A user or admin can configure a VMM (Qemu) Guest's memory to be backed by
hugetlb pages for various reasons. However, a Guest OS would still
allocate (and pin) buffers that are backed by regular 4k sized pages. In
order to map these buffers and create dma-bufs for them on the Host, we
first need to find the hugetlb pages where the buffer allocations are
located and then determine the offsets of individual chunks (within those
pages) and use this information to eventually populate a scatterlist.
Testcase: default_hugepagesz=2M hugepagesz=2M hugepages=2500 options
were passed to the Host kernel and Qemu was launched with these
relevant options: qemu-system-x86_64 -m 4096m....
-device virtio-gpu-pci,max_outputs=1,blob=true,xres=1920,yres=1080
-display gtk,gl=on
-object memory-backend-memfd,hugetlb=on,id=mem1,size=4096M
-machine memory-backend=mem1
Replacing -display gtk,gl=on with -display gtk,gl=off above would
exercise the mmap handler.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Vivek Kasireddy <[email protected]>
Acked-by: Mike Kravetz <[email protected]> (v2)
Acked-by: Dave Airlie <[email protected]>
Acked-by: Gerd Hoffmann <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Peter Xu <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: Dongwon Kim <[email protected]>
Cc: Junxiao Chang <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions