[PATCH 1/3] cpuidle: powernv: Don't bounce between low and very low thread priority

Vaidyanathan Srinivasan svaidy at linux.vnet.ibm.com
Tue Apr 4 14:13:43 AEST 2017


* Nicholas Piggin <npiggin at gmail.com> [2017-04-04 09:52:07]:

> On Tue,  4 Apr 2017 07:54:12 +1000
> Anton Blanchard <anton at ozlabs.org> wrote:
> 
> > From: Anton Blanchard <anton at samba.org>
> > 
> > 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.
> 
> This looks good. I have HMT_lowest() which does alt feature patching
> we can use for pseries and default idle code.

Alternatively, if we are going to set priority only once in various
other places, HMT_low(); HMT_very_low(); should not add to extra
cycles.  Let me code that up.

--Vaidy

 



More information about the Linuxppc-dev mailing list