diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/core.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 7f3063c153d8..866d840b99ca 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -736,19 +736,15 @@ static inline bool got_nohz_idle_kick(void) | |||
736 | #ifdef CONFIG_NO_HZ_FULL | 736 | #ifdef CONFIG_NO_HZ_FULL |
737 | bool sched_can_stop_tick(void) | 737 | bool sched_can_stop_tick(void) |
738 | { | 738 | { |
739 | struct rq *rq; | ||
740 | |||
741 | rq = this_rq(); | ||
742 | |||
743 | /* | 739 | /* |
744 | * More than one running task need preemption. | 740 | * More than one running task need preemption. |
745 | * nr_running update is assumed to be visible | 741 | * nr_running update is assumed to be visible |
746 | * after IPI is sent from wakers. | 742 | * after IPI is sent from wakers. |
747 | */ | 743 | */ |
748 | if (rq->nr_running > 1) | 744 | if (this_rq()->nr_running > 1) |
749 | return false; | 745 | return false; |
750 | 746 | ||
751 | return true; | 747 | return true; |
752 | } | 748 | } |
753 | #endif /* CONFIG_NO_HZ_FULL */ | 749 | #endif /* CONFIG_NO_HZ_FULL */ |
754 | 750 | ||