diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2020-07-28 19:17:55 +0800 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-07-28 13:27:54 +0200 |
commit | 21a6ee14a8f277766618ef07154432b46528113e (patch) | |
tree | 99e14a15b12a3ba84610bb7f17352ba11420a783 | |
parent | c1b7b8d42b5422627b0a8268416a60748f8d000f (diff) | |
download | linux-21a6ee14a8f277766618ef07154432b46528113e.tar.bz2 |
sched: Remove duplicated tick_nohz_full_enabled() check
In sched_update_tick_dependency() there's two calls that check
whether nohz_full is enabled: tick_nohz_full_cpu() does it
implicitly, while there's also an explicit call to tick_nohz_full_enabled().
Remove the duplicated, open coded check.
[ mingo: Amended the changelog. ]
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/1595935075-14223-1-git-send-email-linmiaohe@huawei.com
-rw-r--r-- | kernel/sched/sched.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 9f33c77258ea..296efd30d8c9 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1961,12 +1961,7 @@ extern int __init sched_tick_offload_init(void); */ static inline void sched_update_tick_dependency(struct rq *rq) { - int cpu; - - if (!tick_nohz_full_enabled()) - return; - - cpu = cpu_of(rq); + int cpu = cpu_of(rq); if (!tick_nohz_full_cpu(cpu)) return; |