diff options
author | Anton Blanchard <anton@samba.org> | 2017-04-03 17:54:12 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-04-19 17:17:18 -0400 |
commit | 79b578111febef642143669254b243ffbcf64ea9 (patch) | |
tree | b48a6b2d200392ee6103da2388bbb6676443f942 | |
parent | 02018b3929a23acdd452b986e7c8aeca4529d492 (diff) |
cpuidle: powernv: Don't bounce between low and very low thread priority
The core of snooze_loop() continually bounces between low and very
low thread priority. Changing thread priorities is an expensive
operation that can negatively impact other threads on a core.
All CPUs that can run PowerNV support very low priority, so we can
avoid the change completely.
Signed-off-by: Anton Blanchard <anton@samba.org>
Reviewed-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpuidle/cpuidle-powernv.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c index a06df51a36c0..0ddf1a5bb0a9 100644 --- a/drivers/cpuidle/cpuidle-powernv.c +++ b/drivers/cpuidle/cpuidle-powernv.c | |||
@@ -57,7 +57,6 @@ static int snooze_loop(struct cpuidle_device *dev, | |||
57 | snooze_exit_time = get_tb() + snooze_timeout; | 57 | snooze_exit_time = get_tb() + snooze_timeout; |
58 | ppc64_runlatch_off(); | 58 | ppc64_runlatch_off(); |
59 | while (!need_resched()) { | 59 | while (!need_resched()) { |
60 | HMT_low(); | ||
61 | HMT_very_low(); | 60 | HMT_very_low(); |
62 | if (snooze_timeout_en && get_tb() > snooze_exit_time) | 61 | if (snooze_timeout_en && get_tb() > snooze_exit_time) |
63 | break; | 62 | break; |