Commit 1682fd2e authored by Frederic Weisbecker's avatar Frederic Weisbecker Committed by Zheng Zengkai
Browse files

tick/nohz: Only wake up a single target cpu when kicking a task

mainline inclusion
from mainline-5.14-rc1
commit 29721b85
category: feature
feature: Deep isolation
bugzilla: https://gitee.com/openeuler/kernel/issues/I4N00D
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=29721b859217b946bfc001c1644745ed4d7c26cb



--------------------------------

When adding a tick dependency to a task, its necessary to
wake up the CPU where the task resides to reevaluate tick
dependencies on that CPU.

However the current code wakes up all nohz_full CPUs, which
is unnecessary.

Switch to waking up a single CPU, by using ordering of writes
to task->cpu and task->tick_dep_mask.

[ mingo: Minor readability edit. ]

Suggested-by: default avatarPeter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210512232924.150322-7-frederic@kernel.org


Signed-off-by: default avatarYunfeng Ye <yeyunfeng@huawei.com>
Reviewed-by: default avatarChao Liu <liuchao173@huawei.com>
Reviewed-by: default avatarChen Hui <judy.chenhui@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 98390b74
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment