diff options
author | Jan Kara <[email protected]> | 2017-11-15 17:37:33 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2017-11-15 18:21:06 -0800 |
commit | aa65c29ce1b6e1990cd2c7d8004bbea7ff3aff38 (patch) | |
tree | f3a3fe2b5a6430f04e721c4c35f9209fa6482e32 /tools/perf/scripts/python | |
parent | 5ecc4d852c03b82646bf563460091b95f6a8c7c0 (diff) |
mm: batch radix tree operations when truncating pages
Currently we remove pages from the radix tree one by one. To speed up
page cache truncation, lock several pages at once and free them in one
go. This allows us to batch radix tree operations in a more efficient
way and also save round-trips on mapping->tree_lock. As a result we
gain about 20% speed improvement in page cache truncation.
Data from a simple benchmark timing 10000 truncates of 1024 pages (on
ext4 on ramdisk but the filesystem is barely visible in the profiles).
The range shows 1% and 95% percentiles of the measured times:
4.14-rc2 4.14-rc2 + batched truncation
248-256 209-219
249-258 209-217
248-255 211-239
248-255 209-217
247-256 210-218
[[email protected]: convert delete_from_page_cache_batch() to pagevec]
Link: http://lkml.kernel.org/r/[email protected]
[[email protected]: move struct pagevec forward declaration to top-of-file]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jan Kara <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Reviewed-by: Andi Kleen <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions