提交 aa7fe253 编写于 作者: F Frederic Weisbecker 提交者: Zheng Zengkai

tick/nohz: Remove superflous check for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE

mainline inclusion
from mainline-5.14-rc1
commit 3f624314
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=3f624314b3f7c580aa5844a8930befd71e2a287c

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

The vtime_accounting_enabled_this_cpu() early check already makes what
follows as dead code in the case of CONFIG_VIRT_CPU_ACCOUNTING_NATIVE.
No need to keep the ifdeferry around.
Signed-off-by: NFrederic Weisbecker <frederic@kernel.org>
Signed-off-by: NIngo Molnar <mingo@kernel.org>
Acked-by: NPeter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210512232924.150322-4-frederic@kernel.orgSigned-off-by: NYunfeng Ye <yeyunfeng@huawei.com>
Reviewed-by: NChao Liu <liuchao173@huawei.com>
Reviewed-by: NChen Hui <judy.chenhui@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 8aec95a8
...@@ -1172,7 +1172,6 @@ unsigned long tick_nohz_get_idle_calls(void) ...@@ -1172,7 +1172,6 @@ unsigned long tick_nohz_get_idle_calls(void)
static void tick_nohz_account_idle_ticks(struct tick_sched *ts) static void tick_nohz_account_idle_ticks(struct tick_sched *ts)
{ {
#ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
unsigned long ticks; unsigned long ticks;
if (vtime_accounting_enabled_this_cpu()) if (vtime_accounting_enabled_this_cpu())
...@@ -1188,7 +1187,6 @@ static void tick_nohz_account_idle_ticks(struct tick_sched *ts) ...@@ -1188,7 +1187,6 @@ static void tick_nohz_account_idle_ticks(struct tick_sched *ts)
*/ */
if (ticks && ticks < LONG_MAX) if (ticks && ticks < LONG_MAX)
account_idle_ticks(ticks); account_idle_ticks(ticks);
#endif
} }
void tick_nohz_idle_restart_tick(void) void tick_nohz_idle_restart_tick(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册