• M
    mm, compaction: use free lists to quickly locate a migration target · 8eaac357
    Mel Gorman 提交于
    to #26255339
    
    commit 5a811889de10f1ebb8e03a2744be006e909c405c upstream
    
    Similar to the migration scanner, this patch uses the free lists to
    quickly locate a migration target.  The search is different in that
    lower orders will be searched for a suitable high PFN if necessary but
    the search is still bound.  This is justified on the grounds that the
    free scanner typically scans linearly much more than the migration
    scanner.
    
    If a free page is found, it is isolated and compaction continues if
    enough pages were isolated.  For SYNC* scanning, the full pageblock is
    scanned for any remaining free pages so that is can be marked for
    skipping in the near future.
    
    1-socket thpfioscale
                                         5.0.0-rc1              5.0.0-rc1
                                     isolmig-v3r15         findfree-v3r16
    Amean     fault-both-3      3024.41 (   0.00%)     3200.68 (  -5.83%)
    Amean     fault-both-5      4749.30 (   0.00%)     4847.75 (  -2.07%)
    Amean     fault-both-7      6454.95 (   0.00%)     6658.92 (  -3.16%)
    Amean     fault-both-12    10324.83 (   0.00%)    11077.62 (  -7.29%)
    Amean     fault-both-18    12896.82 (   0.00%)    12403.97 (   3.82%)
    Amean     fault-both-24    13470.60 (   0.00%)    15607.10 * -15.86%*
    Amean     fault-both-30    17143.99 (   0.00%)    18752.27 (  -9.38%)
    Amean     fault-both-32    17743.91 (   0.00%)    21207.54 * -19.52%*
    
    The impact on latency is variable but the search is optimistic and
    sensitive to the exact system state.  Success rates are similar but the
    major impact is to the rate of scanning
    
                                    5.0.0-rc1      5.0.0-rc1
                                isolmig-v3r15 findfree-v3r16
    Compaction migrate scanned    25646769          29507205
    Compaction free scanned      201558184         100359571
    
    The free scan rates are reduced by 50%.  The 2-socket reductions for the
    free scanner are more dramatic which is a likely reflection that the
    machine has more memory.
    
    [dan.carpenter@oracle.com: fix static checker warning]
    [vbabka@suse.cz: correct number of pages scanned for lower orders]
    Link: http://lkml.kernel.org/r/20190118175136.31341-12-mgorman@techsingularity.netSigned-off-by: NMel Gorman <mgorman@techsingularity.net>
    Acked-by: NVlastimil Babka <vbabka@suse.cz>
    Cc: Dan Carpenter <dan.carpenter@oracle.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: YueHaibing <yuehaibing@huawei.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: NYang Shi <yang.shi@linux.alibaba.com>
    Reviewed-by: NXunlei Pang <xlpang@linux.alibaba.com>
    8eaac357
compaction.c 70.6 KB