Re: [PATCH 20/22] mm, compaction: Sample pageblocks for free pages
From: Vlastimil Babka
Date: Thu Jan 31 2019 - 10:39:23 EST
On 1/18/19 6:51 PM, Mel Gorman wrote:
> Once fast searching finishes, there is a possibility that the linear
> scanner is scanning full blocks found by the fast scanner earlier. This
> patch uses an adaptive stride to sample pageblocks for free pages. The
> more consecutive full pageblocks encountered, the larger the stride until
> a pageblock with free pages is found. The scanners might meet slightly
> sooner but it is an acceptable risk given that the search of the free
> lists may still encounter the pages and adjust the cached PFN of the free
> scanner accordingly.
>
> 5.0.0-rc1 5.0.0-rc1
> roundrobin-v3r17 samplefree-v3r17
> Amean fault-both-1 0.00 ( 0.00%) 0.00 * 0.00%*
> Amean fault-both-3 2752.37 ( 0.00%) 2729.95 ( 0.81%)
> Amean fault-both-5 4341.69 ( 0.00%) 4397.80 ( -1.29%)
> Amean fault-both-7 6308.75 ( 0.00%) 6097.61 ( 3.35%)
> Amean fault-both-12 10241.81 ( 0.00%) 9407.15 ( 8.15%)
> Amean fault-both-18 13736.09 ( 0.00%) 10857.63 * 20.96%*
> Amean fault-both-24 16853.95 ( 0.00%) 13323.24 * 20.95%*
> Amean fault-both-30 15862.61 ( 0.00%) 17345.44 ( -9.35%)
> Amean fault-both-32 18450.85 ( 0.00%) 16892.00 ( 8.45%)
>
> The latency is mildly improved offseting some overhead from earlier
> patches that are prerequisites for the rest of the series. However,
> a major impact is on the free scan rate with an 82% reduction.
>
> 5.0.0-rc1 5.0.0-rc1
> roundrobin-v3r17 samplefree-v3r17
> Compaction migrate scanned 21607271 20116887
> Compaction free scanned 95336406 16668703
>
> It's also the first time in the series where the number of pages scanned
> by the migration scanner is greater than the free scanner due to the
> increased search efficiency.
>
> Signed-off-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
Acked-by: Vlastimil Babka <vbabka@xxxxxxx>