aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorVivek Kasireddy <[email protected]>2024-06-23 23:36:11 -0700
committerAndrew Morton <[email protected]>2024-07-12 15:52:09 -0700
commit89c1905d9c140372b7f50ef48f42378cf85d9bc5 (patch)
treee8b4e79f574a4c36381731fad497b3e901159356 /tools/perf/scripts/python/stackcollapse.py
parent53ba78de064b6a45f5925947b3b45e9e833c2f8a (diff)
mm/gup: introduce memfd_pin_folios() for pinning memfd folios
For drivers that would like to longterm-pin the folios associated with a memfd, the memfd_pin_folios() API provides an option to not only pin the folios via FOLL_PIN but also to check and migrate them if they reside in movable zone or CMA block. This API currently works with memfds but it should work with any files that belong to either shmemfs or hugetlbfs. Files belonging to other filesystems are rejected for now. The folios need to be located first before pinning them via FOLL_PIN. If they are found in the page cache, they can be immediately pinned. Otherwise, they need to be allocated using the filesystem specific APIs and then pinned. [[email protected]: improve the CONFIG_MMU=n situation, per SeongJae] [[email protected]: return -EINVAL if the end offset is greater than the size of memfd] Link: https://lkml.kernel.org/r/IA0PR11MB71850525CBC7D541CAB45DF1F8DB2@IA0PR11MB7185.namprd11.prod.outlook.com Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Vivek Kasireddy <[email protected]> Suggested-by: Jason Gunthorpe <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> (v2) Reviewed-by: David Hildenbrand <[email protected]> (v3) Reviewed-by: Christoph Hellwig <[email protected]> (v6) Acked-by: Dave Airlie <[email protected]> Acked-by: Gerd Hoffmann <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Peter Xu <[email protected]> Cc: Dongwon Kim <[email protected]> Cc: Junxiao Chang <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Mike Kravetz <[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/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions