public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Con Kolivas <kernel@kolivas.org>,
	linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Daniel Petrini <d.pensator@gmail.com>,
	Tony Lindgren <tony@atomide.com>,
	vatsa@in.ibm.com, ck list <ck@vds.kolivas.org>,
	Pavel Machek <pavel@ucw.cz>, Adam Belay <abelay@novell.com>,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>
Subject: Re: [PATCH] i386 No Idle HZ aka dynticks 051221
Date: Sun, 25 Dec 2005 21:55:26 -0500	[thread overview]
Message-ID: <20051226025525.GA6697@thunk.org> (raw)
In-Reply-To: <20051225171617.GA6929@thunk.org>

I've been doing some extended and more careful measurements of power
consumption with and without dynticks, and it appears that at least on
my Thinkpad T40p laptop (1.6 GHz Pentium-M, model #2373G1U), dyntick
isn't helping the power consumption by any appreciable amount.  It's
not hurting, but it's not helping.

I believe the reason why is that the T40 has an extra C state which
only shows up if you are running on battery; if you are running on the
AC mains, C4 disappears:

   *C1:                  type[C1] promotion[C2] demotion[--] latency[001] usage[00000000] time[00000000000000000000]
    C2:                  type[C2] promotion[C3] demotion[C1] latency[001] usage[00000000] time[00000000000000000000]
    C3:                  type[C3] promotion[C4] demotion[C2] latency[085] usage[00000000] time[00000000000000000000]
    C4:                  type[C3] promotion[--] demotion[C3] latency[185] usage[00000000] time[00000000000000000000]

With dyntick enabled, the laptop never enters the C4 state, but
instead bounces back and forth between C2 and C3 (and I notice that we
never enter C1 state, even when the CPU is completely pegged, but
that's true with or without dyntick).  

If dyntick is enabled, the laptop enters C4 state, which presumably is
a deeper, more power saving state, and it appears power saving effects
of dyntick is getting balanced off against the fact that C4 is never
getting entered when it is enabled.

Looking at acpi/processor_idle.c, there is all sorts of magic special
cases code for the C2 and C3 states (both for promotion/demotion
polcies, as well as what to do when idling in those particular
states), and which doesn't exist for other states, such as C4.
Presumably this explains why we are only never entering C1, and why
dyntick enabled C4 never gets reached.  What I don't understand is
_why_ all of the magic is present for those two states, but not for
any of the others.

For future work when I have time, is to actually do some performance
benchmarks; given that the power consumption doesn't appear to be
changed either way with dyntick enabled or disabled, does the time
needed to compile a kernel change significantly with or without
dyntick?

						- Ted

  reply	other threads:[~2005-12-26 18:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-20 16:10 [PATCH] i386 No Idle HZ aka dynticks 051221 Con Kolivas
2005-12-20 17:27 ` Jan De Luyck
2005-12-20 19:39   ` Daniel Petrini
2005-12-20 20:46     ` Jan De Luyck
2005-12-25 17:16 ` Theodore Ts'o
2005-12-26  2:55   ` Theodore Ts'o [this message]
2005-12-26 18:47     ` Matthew Garrett
2005-12-26 18:56     ` Theodore Ts'o
2005-12-26 20:03     ` Dominik Brodowski
2005-12-26 20:38     ` Pavel Machek
2005-12-26 22:52       ` Theodore Ts'o
2005-12-26 23:27         ` Pavel Machek
2005-12-27 14:03           ` Pavel Machek
2005-12-27 14:22             ` C4 strangeness [was Re: [PATCH] i386 No Idle HZ aka dynticks 051221] Pavel Machek
2005-12-27 15:33               ` C4 non-strangeness [was: " Dominik Brodowski
2005-12-27 16:13                 ` Pavel Machek
2005-12-26 22:19     ` [PATCH] i386 No Idle HZ aka dynticks 051221 Dominik Brodowski
2005-12-27  0:33       ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051226025525.GA6697@thunk.org \
    --to=tytso@mit.edu \
    --cc=abelay@novell.com \
    --cc=ck@vds.kolivas.org \
    --cc=d.pensator@gmail.com \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=pavel@ucw.cz \
    --cc=tony@atomide.com \
    --cc=vatsa@in.ibm.com \
    --cc=zwane@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox