summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorJiang Biao <benbjiang@tencent.com>2021-02-26 04:16:54 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-02-26 20:41:00 +0300
commitfbcc8183a4f815910697237386681153a05d9573 (patch)
tree0608fed68d21c0f2206424db1fada188fd4a23f1 /mm
parent629484ae73754243917e06d8d5e5f37c26e99399 (diff)
downloadlinux-fbcc8183a4f815910697237386681153a05d9573.tar.xz
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 <benbjiang@tencent.com> Reported-by: Bin Lai <robinlai@tencent.com> Cc: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/vmstat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c
index e60b36f5f0a9..74b2c374b86c 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1980,6 +1980,8 @@ static void vmstat_shepherd(struct work_struct *w)
if (!delayed_work_pending(dw) && need_update(cpu))
queue_delayed_work_on(cpu, mm_percpu_wq, dw, 0);
+
+ cond_resched();
}
put_online_cpus();