aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/radix-tree/maple.c
diff options
context:
space:
mode:
authorPeter Xu <[email protected]>2023-06-28 21:53:07 +0000
committerAndrew Morton <[email protected]>2023-08-18 17:12:03 +0000
commit57edfcfd3419b4799353d8cbd6ce49da075cfdbd (patch)
tree7d490cb4c6821586f250a0394ac8b19118db2802 /tools/testing/radix-tree/maple.c
parentmm/gup: cleanup next_page handling (diff)
downloadkernel-57edfcfd3419b4799353d8cbd6ce49da075cfdbd.tar.gz
kernel-57edfcfd3419b4799353d8cbd6ce49da075cfdbd.zip
mm/gup: accelerate thp gup even for "pages != NULL"
The acceleration of THP was done with ctx.page_mask, however it'll be ignored if **pages is non-NULL. The old optimization was introduced in 2013 in 240aadeedc4a ("mm: accelerate mm_populate() treatment of THP pages"). It didn't explain why we can't optimize the **pages non-NULL case. It's possible that at that time the major goal was for mm_populate() which should be enough back then. Optimize thp for all cases, by properly looping over each subpage, doing cache flushes, and boost refcounts / pincounts where needed in one go. This can be verified using gup_test below: # chrt -f 1 ./gup_test -m 512 -t -L -n 1024 -r 10 Before: 13992.50 ( +-8.75%) After: 378.50 (+-69.62%) Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Peter Xu <[email protected]> Reviewed-by: Lorenzo Stoakes <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: James Houghton <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: John Hubbard <[email protected]> Cc: Kirill A . Shutemov <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Mike Kravetz <[email protected]> Cc: Mike Rapoport (IBM) <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: Yang Shi <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/testing/radix-tree/maple.c')
0 files changed, 0 insertions, 0 deletions