lkml.org 
[lkml]   [2020]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] sched: remove duplicated tick_nohz_full_enabled() check
Date
From: Miaohe Lin <linmiaohe@huawei.com>

The func tick_nohz_full_enabled() is also called by tick_nohz_full_cpu().
So this one is duplicated and should be removed.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
kernel/sched/sched.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 877fb08eb1b0..02028f785f87 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1930,12 +1930,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;
--
2.19.1
\
 
 \ /
  Last update: 2020-07-28 13:16    [W:0.149 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site