aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJohn Hubbard <[email protected]>2020-06-03 15:56:30 -0700
committerLinus Torvalds <[email protected]>2020-06-03 20:09:42 -0700
commit376a34efa4eeb699d285c1a741b186d44b44c429 (patch)
tree28777ed5adb18aa901cbbb24ef09fa09db70df7b /tools/perf/scripts/python
parent9e1f0580d37e0d3fcfc2274128a5cc476feba5d0 (diff)
mm/gup: refactor and de-duplicate gup_fast() code
There were two nearly identical sets of code for gup_fast() style of walking the page tables with interrupts disabled. This has lead to the usual maintenance problems that arise from having duplicated code. There is already a core internal routine in gup.c for gup_fast(), so just enhance it very slightly: allow skipping the fall-back to "slow" (regular) get_user_pages(), via the new FOLL_FAST_ONLY flag. Then, just call internal_get_user_pages_fast() from __get_user_pages_fast(), and adjust the API to match pre-existing API behavior. There is a change in behavior from this refactoring: the nested form of interrupt disabling is used in all gup_fast() variants now. That's because there is only one place that interrupt disabling for page walking is done, and so the safer form is required. This should, if anything, eliminate possible (rare) bugs, because the non-nested form of enabling interrupts was fragile at best. [[email protected]: fixup] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: John Hubbard <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: David Airlie <[email protected]> Cc: Jani Nikula <[email protected]> Cc: "Joonas Lahtinen" <[email protected]> Cc: Matthew Auld <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Rodrigo Vivi <[email protected]> Cc: Souptick Joarder <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions