提交 e512cc33 编写于 作者: J Jiang Biao 提交者: Zheng Zengkai

mm/vmstat.c: erase latency in vmstat_shepherd

mainline inclusion
from mainline-5.12-rc1
commit fbcc8183
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I3ZW3B
CVE: NA

-------------------------------------------------
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.comSigned-off-by: NJiang Biao <benbjiang@tencent.com>
Reported-by: NBin Lai <robinlai@tencent.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NChengyang Fan <cy.fan@huawei.com>
Reviewed-by: NChen Wandun <chenwandun@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 fa736dd0
...@@ -1963,6 +1963,8 @@ static void vmstat_shepherd(struct work_struct *w) ...@@ -1963,6 +1963,8 @@ static void vmstat_shepherd(struct work_struct *w)
if (!delayed_work_pending(dw) && need_update(cpu)) if (!delayed_work_pending(dw) && need_update(cpu))
queue_delayed_work_on(cpu, mm_percpu_wq, dw, 0); queue_delayed_work_on(cpu, mm_percpu_wq, dw, 0);
cond_resched();
} }
put_online_cpus(); put_online_cpus();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册