FROMLIST: BACKPORT: mm/page_alloc: Remotely drain per-cpu lists
Some setups, notably NOHZ_FULL CPUs, are too busy to handle the per-cpu drain work queued by __drain_all_pages(). So introduce new a mechanism to remotely drain the per-cpu lists. It is made possible by remotely locking 'struct per_cpu_pages' new per-cpu spinlocks. A benefit of this new scheme is that drain operations are now migration safe. There was no observed performance degradation vs. the previous scheme. Both netperf and hackbench were run in parallel to triggering the __drain_all_pages(NULL, true) code path around ~100 times per second. The new scheme performs a bit better (~5%), although the important point here is there are no performance regressions vs. the previous mechanism. Per-cpu lists draining happens only in slow paths. Signed-off-by:Nicolas Saenz Julienne <nsaenzju@redhat.com> Signed-off-by:
Mel Gorman <mgorman@techsingularity.net> Link: https://lore.kernel.org/all/20220420095906.27349-7-mgorman@techsingularity.net/ Conflicts: mm/page_alloc.c 1. aosp doesn't need 9c25cbfc, skip it Bug: 230899966 Signed-off-by:
Minchan Kim <minchan@google.com> Change-Id: I8c4120d215836b04c53d0e4950a821fce4c99075
Loading
Please sign in to comment