[patch 025/118] mm/vmstat.c: erase latency in vmstat_shepherd
From: Andrew Morton <akpm@linux-foundation.org>
Date: 2021-02-26 01:16:58
Also in:
mm-commits
From: Andrew Morton <akpm@linux-foundation.org>
Date: 2021-02-26 01:16:58
Also in:
mm-commits
From: Jiang Biao <redacted> Subject: mm/vmstat.c: erase latency in vmstat_shepherd Many 100us+ latencies have been deteceted in vmstat_shepherd() on CPX platform which has 208 logic cpus. And vmstat_shepherd is queued every second, which could make the case worse. Add schedule point in vmstat_shepherd() to erase the latency. Link: https://lkml.kernel.org/r/20210111035526.1511-1-benbjiang@tencent.com Signed-off-by: Jiang Biao <redacted> Reported-by: Bin Lai <redacted> Cc: Christoph Lameter <redacted> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> --- mm/vmstat.c | 2 ++ 1 file changed, 2 insertions(+)
--- a/mm/vmstat.c~mm-vmstatc-erase-latency-in-vmstat_shepherd
+++ a/mm/vmstat.c@@ -1980,6 +1980,8 @@ static void vmstat_shepherd(struct work_ if (!delayed_work_pending(dw) && need_update(cpu)) queue_delayed_work_on(cpu, mm_percpu_wq, dw, 0); + + cond_resched(); } put_online_cpus();
_