Subject: Re: Why is the e500v2 core not using cpuidle?

From: Scott Wood <[email-masked]>
Date: Mon, 4 Feb 2013 14:02:35 -0600

On 02/02/2013 03:41:27 AM, Thomas Waldecker wrote:
> Hi Scott,
>=20
> >> Why is there no support for the cpuidle framework?
> > Because nobody implemented it. :-)
> That's the reason I thought before :-)
>=20
> > The only reason I can think of to implement it on this chip would =20
> be to
> > dynamically choose when to enter nap versus doze, rather than always
> > just using doze.  It's not clear whether the difference in power
> > savings is worth it -- do you have any way of measuring?
>=20
> Is the e500 only using doze? There are comments in the file
> arch/powerpc/kernel/idle_e500.S
> which are stating:
> /*  Go to NAP or DOZE now */
> or
> /* Return from NAP/DOZE ...*/
>=20
> and because of this comments I thought that both modes are in use.

e500 can use nap instead, but it's statically chosen via sysctl.  The =20
default is doze.  Entering nap requires flushing the cache, so you'd =20
only use nap if you care more about lowering idle power consumption =20
than performance, and you wake infrequently enough that you're not =20
burning more power on the cache flushes than you save with the deeper =20
idle state.

> I have a way of measuring the power and it is also a small part of my =20
> masterthesis,
> but it is not very meaningful because at the measuring point there =20
> are other peripheral
> components too.
>=20
> According to the comments can I activate the nap mode somehow?

echo 1 > /proc/sys/kernel/powersave-nap

If you're able to measure a meaningful difference between the two, I'd =20
be interested in hearing your results.

> >> How can I debug the e500 idle modes?
> >> Are there any statistics?
> > Top reports idle percentage...
> If the e500 and e500v2 are indeed using only the doze mode it
> would be enough statistics.

Whichever mode you have selected, that will be used for all idling.  =20
Statistics would only be useful if the idle mode were dynamically =20
chosen.

> Such statistics would be great for the doze, nap (and sleep for the =20
> whole package).

The only way you'll get into sleep mode is through /sys/power/state.

-Scott=