linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Why is the e500v2 core  not using cpuidle?
@ 2013-02-01 12:06 Thomas Waldecker
  2013-02-01 18:15 ` Scott Wood
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Waldecker @ 2013-02-01 12:06 UTC (permalink / raw)
  To: Linux PPC dev mailing list (linuxppc-dev@lists.ozlabs.org)

Hi,

As part of my masterthesis I was just looking around the kernel=20
sources for cpuidle and figured out that the only CPU in the PowerPC=20
architecture using the cpuidle framework is the pseries.

I assume the e500v2 core is using the idle modes=20
in arch/powerpc/kernel/idle_e500.S

Why is there no support for the cpuidle framework?

How can I debug the e500 idle modes?=20
Are there any statistics?

I already ran PowerTOP on a QorIQ P2020 but it's almost useless=20
because the information is missing.

Kind regards,
Thomas Waldecker

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why is the e500v2 core not using cpuidle?
  2013-02-01 12:06 Thomas Waldecker
@ 2013-02-01 18:15 ` Scott Wood
  0 siblings, 0 replies; 5+ messages in thread
From: Scott Wood @ 2013-02-01 18:15 UTC (permalink / raw)
  To: Thomas Waldecker
  Cc: Linux PPC dev mailing list (linuxppc-dev@lists.ozlabs.org)

On 02/01/2013 06:06:05 AM, Thomas Waldecker wrote:
> Hi,
>=20
> As part of my masterthesis I was just looking around the kernel
> sources for cpuidle and figured out that the only CPU in the PowerPC
> architecture using the cpuidle framework is the pseries.
>=20
> I assume the e500v2 core is using the idle modes
> in arch/powerpc/kernel/idle_e500.S
>=20
> Why is there no support for the cpuidle framework?

Because nobody implemented it. :-)

The only reason I can think of to implement it on this chip would be to =20
dynamically choose when to enter nap versus doze, rather than always =20
just using doze.  It's not clear whether the difference in power =20
savings is worth it -- do you have any way of measuring?

> How can I debug the e500 idle modes?
> Are there any statistics?

Top reports idle percentage...

> I already ran PowerTOP on a QorIQ P2020 but it's almost useless
> because the information is missing.

What information are you looking for?

-Scott=

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why is the e500v2 core not using cpuidle?
  2013-02-02  9:41 AW: " Thomas Waldecker
@ 2013-02-04 20:02 ` Scott Wood
  0 siblings, 0 replies; 5+ messages in thread
From: Scott Wood @ 2013-02-04 20:02 UTC (permalink / raw)
  To: Thomas Waldecker
  Cc: Linux PPC dev mailing list (linuxppc-dev@lists.ozlabs.org)

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=

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why is the e500v2 core not using cpuidle?
@ 2013-02-07 12:19 Thomas Waldecker
  2013-02-07 18:01 ` Scott Wood
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Waldecker @ 2013-02-07 12:19 UTC (permalink / raw)
  To: Scott Wood; +Cc: Linux PPC dev mailing list (linuxppc-dev@lists.ozlabs.org)

Hi Scott,

I measured the power consumption of the whole system on the tqmp2020 ( http=
://tq-group.com/tqmp2020 )
with a QorIQ P2020.

Kernel:
root@generic-powerpc-e500v2:/sys/power# uname -a
Linux generic-powerpc-e500v2 3.7.0-rc8-00004-g6e93414 #4 SMP Tue Dec 11 08:=
53:23 CET 2012 ppc GNU/Linux
root@generic-powerpc-e500v2:/sys/power# cat /etc/issue
ELDK 5.2.1 \n \l

In idle using doze I got:
545mA, 18V =3D> 9.81W

In idle using nap I got:
500mA, 18V =3D> 9W

That's a difference of 0.81W,
0.81W/9.81W =3D 0.083 (8.3 %)

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

How can I use this interface?

root@generic-powerpc-e500v2:/sys/power# ls -la
total 0
drwxr-xr-x  2 root root    0 Feb  1 15:39 .
dr-xr-xr-x 12 root root    0 Feb  1 15:19 ..
-rw-r--r--  1 root root 4096 Feb  1 15:39 state
root@generic-powerpc-e500v2:/sys/power# cat state
root@generic-powerpc-e500v2:/sys/power# echo "sleep" > state
-sh: echo: write error: Function not implemented
root@generic-powerpc-e500v2:/sys/power# echo 0 > state
-sh: echo: write error: Function not implemented
root@generic-powerpc-e500v2:/sys/power#

Kind regards
Thomas Waldecker

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why is the e500v2 core not using cpuidle?
  2013-02-07 12:19 Why is the e500v2 core not using cpuidle? Thomas Waldecker
@ 2013-02-07 18:01 ` Scott Wood
  0 siblings, 0 replies; 5+ messages in thread
From: Scott Wood @ 2013-02-07 18:01 UTC (permalink / raw)
  To: Thomas Waldecker
  Cc: Linux PPC dev mailing list (linuxppc-dev@lists.ozlabs.org)

On 02/07/2013 06:19:25 AM, Thomas Waldecker wrote:
> Hi Scott,
>=20
> I measured the power consumption of the whole system on the tqmp2020 =20
> ( http://tq-group.com/tqmp2020 )
> with a QorIQ P2020.
>=20
> Kernel:
> root@generic-powerpc-e500v2:/sys/power# uname -a
> Linux generic-powerpc-e500v2 3.7.0-rc8-00004-g6e93414 #4 SMP Tue Dec =20
> 11 08:53:23 CET 2012 ppc GNU/Linux
> root@generic-powerpc-e500v2:/sys/power# cat /etc/issue
> ELDK 5.2.1 \n \l
>=20
> In idle using doze I got:
> 545mA, 18V =3D> 9.81W
>=20
> In idle using nap I got:
> 500mA, 18V =3D> 9W
>=20
> That's a difference of 0.81W,
> 0.81W/9.81W =3D 0.083 (8.3 %)

Thanks.

> > The only way you'll get into sleep mode is through /sys/power/state.
>=20
> How can I use this interface?
>=20
> root@generic-powerpc-e500v2:/sys/power# ls -la
> total 0
> drwxr-xr-x  2 root root    0 Feb  1 15:39 .
> dr-xr-xr-x 12 root root    0 Feb  1 15:19 ..
> -rw-r--r--  1 root root 4096 Feb  1 15:39 state
> root@generic-powerpc-e500v2:/sys/power# cat state
> root@generic-powerpc-e500v2:/sys/power# echo "sleep" > state
> -sh: echo: write error: Function not implemented
> root@generic-powerpc-e500v2:/sys/power# echo 0 > state
> -sh: echo: write error: Function not implemented
> root@generic-powerpc-e500v2:/sys/power#

Make sure that CONFIG_FSL_PMC is enabled, and that you have a pmc node =20
in the device tree.  You'll only have standby, not sleep.  mpc8536 and =20
p1022 can support what the chip calls "deep sleep" and is exposed as =20
"sleep" rather than "standby", but it doesn't look like the code for =20
that has made it into mainline Linux yet.

-Scott=

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-02-07 18:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-07 12:19 Why is the e500v2 core not using cpuidle? Thomas Waldecker
2013-02-07 18:01 ` Scott Wood
  -- strict thread matches above, loose matches on Subject: below --
2013-02-02  9:41 AW: " Thomas Waldecker
2013-02-04 20:02 ` Scott Wood
2013-02-01 12:06 Thomas Waldecker
2013-02-01 18:15 ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).