aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorJason Gunthorpe <[email protected]>2020-12-14 19:05:51 -0800
committerLinus Torvalds <[email protected]>2020-12-15 12:13:39 -0800
commit4509b42c38963f495b49aa50209c34337286ecbe (patch)
treef5da3e07162977ca4e9e80aca0455ac114689793 /tools/perf/scripts/python/flamegraph.py
parent52650c8b466bac399aec213c61d74bfe6f7af1a4 (diff)
mm/gup: combine put_compound_head() and unpin_user_page()
These functions accomplish the same thing but have different implementations. unpin_user_page() has a bug where it calls mod_node_page_state() after calling put_page() which creates a risk that the page could have been hot-uplugged from the system. Fix this by using put_compound_head() as the only implementation. __unpin_devmap_managed_user_page() and related can be deleted as well in favour of the simpler, but slower, version in put_compound_head() that has an extra atomic page_ref_sub, but always calls put_page() which internally contains the special devmap code. Move put_compound_head() to be directly after try_grab_compound_head() so people can find it in future. Link: https://lkml.kernel.org/r/[email protected] Fixes: 1970dc6f5226 ("mm/gup: /proc/vmstat: pin_user_pages (FOLL_PIN) reporting") Signed-off-by: Jason Gunthorpe <[email protected]> Reviewed-by: John Hubbard <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: Jan Kara <[email protected]> CC: Joao Martins <[email protected]> CC: Jonathan Corbet <[email protected]> CC: Dan Williams <[email protected]> CC: Dave Chinner <[email protected]> CC: Christoph Hellwig <[email protected]> CC: Jane Chu <[email protected]> CC: "Kirill A. Shutemov" <[email protected]> CC: Michal Hocko <[email protected]> CC: Mike Kravetz <[email protected]> CC: Shuah Khan <[email protected]> CC: Muchun Song <[email protected]> CC: Vlastimil Babka <[email protected]> CC: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions