[PATCH] NO_IDLE_HZ implementation for PPC64

Benjamin Herrenschmidt benh at kernel.crashing.org
Mon Oct 3 18:08:12 EST 2005


On Sun, 2005-10-02 at 23:16 +0530, Srivatsa Vaddagiri wrote:
> Hello,
> 	The patch below implements NO_IDLE_HZ support for pSeries/PPC64. It
> basically lets idle CPUs to cut off their timer ticks until they can.

Hi !
 
I haven't looked at the patch itself yet, but I have a few comments on
your notes:

> Some notes about the patch:
> 
> - Only pseries_shared_idle and pseries_dedicated_idle routines
>   have been converted over to use this support, since I felt 
>   cutting off ticks doesnt make sense if the idle routine is
>   poll-based.

It should be fine to do that on native_idle as well (for things like G5
machines).

> - Boot CPU cannot skip ticks. This is because of the current design wherein
>   only boot CPU updates wall-clock/jiffies.

That should be fairly easy to fix.

>   I didn't see any particular reason why it has been designed like that
>   (maybe to reduce lock contention on xtime_lock?). If we have to allow
>   boot CPU also to skip ticks (which IMO we should), then this design
>   needs to change, i.e we should allow xtime/jiffies to be updated
>   from any CPU (like S390 allows). If people agree that this is the 
>   right direction, then I can give it a shot next.

I don't think we care that much which CPU updates xtime and jiffies. I
would love xtime to die anyway, kernel should get do_gettimeofday()
internally. On ppc64, we only seldomly update xtime. Doing it on CPU0
was, I suppose, a matter of simplicity of the implementation.

> - One requirement is that a call to start_hz_timer should be inserted
>   in every possible interrupt path. Towards this end, have I missed 
>   some interrupt paths? Or have I included some exception path which
>   I shouldn't be!

I think C code is good enough, you probably only need need to add a call
to do_IRQ(). The decrementer interrupt should naturally playback lost
ticks.

Ben.





More information about the Linuxppc64-dev mailing list