Skip to content

Commit

Permalink
sched: Remove duplicated tick_nohz_full_enabled() check
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Miaohe Lin authored and Ingo Molnar committed Jul 28, 2020
1 parent c1b7b8d commit 21a6ee1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions kernel/sched/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 21a6ee1

Please sign in to comment.