tick/nohz: Conditionally restart tick on idle exit
authorYunfeng Ye <yeyunfeng@huawei.com>
Wed, 12 May 2021 23:29:16 +0000 (01:29 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 13 May 2021 12:21:21 +0000 (14:21 +0200)
commita5183862e76fdc25f36b39c2489b816a5c66e2e5
tree88b763a0b5cb634370687def99fcdfdb37122960
parentf105dfec0a951cd0d5bfbfe9dc067ea69f71ad5c
tick/nohz: Conditionally restart tick on idle exit

In nohz_full mode, switching from idle to a task will unconditionally
issue a tick restart. If the task is alone in the runqueue or is the
highest priority, the tick will fire once then eventually stop. But that
alone is still undesired noise.

Therefore, only restart the tick on idle exit when it's strictly
necessary.

Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210512232924.150322-3-frederic@kernel.org
kernel/time/tick-sched.c