linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@linux.intel.com>
To: paulmck@linux.vnet.ibm.com
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>,
	Linux PM <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Rafael Wysocki <rafael.j.wysocki@intel.com>,
	Len Brown <len.brown@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
	Zhang Rui <rui.zhang@intel.com>, Rob Landley <rob@landley.net>
Subject: Re: [PATCH 3/3] PM: Introduce Intel PowerClamp Driver
Date: Tue, 13 Nov 2012 14:45:11 -0800	[thread overview]
Message-ID: <50A2CD77.7000403@linux.intel.com> (raw)
In-Reply-To: <20121113222350.GH2489@linux.vnet.ibm.com>

On 11/13/2012 2:23 PM, Paul E. McKenney wrote:
> On Tue, Nov 13, 2012 at 01:39:22PM -0800, Jacob Pan wrote:
>> On Tue, 13 Nov 2012 13:16:02 -0800
>> "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:
>>
>>>> Please refer to Documentation/thermal/intel_powerclamp.txt for more
>>>> details.  
>>>
>>> If I read this correctly, this forces a group of CPUs into idle for
>>> about 600 milliseconds at a time.  This would indeed delay grace
>>> periods, which could easily result in user complaints.  Also, given
>>> the default RCU_BOOST_DELAY of 500 milliseconds in kernels enabling
>>> RCU_BOOST, you would see needless RCU priority boosting.
>>>
>> the default idle injection duration is 6ms. we adjust the sleep
>> interval to ensure idle ratio. So the idle duration stays the same once
>> set. So would it be safe to delay grace period for this small amount in
>> exchange for less over head in each injection period?
> 
> Ah, 6ms of delay is much better than 600ms.  Should be OK (famous last
> words!).

well... power clamping is not "free".
You're going to lose performance as a trade off for dropping instantaneous power consumption....
in the measurements we've done comparing various methods.. this one is doing remarkably well.

> 
> For most kernel configuration options, it does use softirq.  And yes,
> the kthread you are using would yield to softirqs -- but only as long
> as softirq processing hasn't moved over to ksoftirqd.  Longer term,
> RCU will be moving from softirq to kthreads, though, and these might be
> prempted by your powerclamp kthread, depending on priorities.  It looks
> like you use RT prio 50, which would usually preempt the RCU kthreads
> (unless someone changed the priorities).

we tried to pick a "middle of the road" value, so that usages that really really
want to run, still get to run, but things that are more loose about it, get put on hold.


> 
>>> It looks like you could end up with part of the system powerclamped
>>> in some situations, and with all of it powerclamped in other
>>> situations. Is that the case, or am I confused?
>>>
>> could you explain the part that is partially powerclamped?
> 
> Suppose that a given system has two sockets.  Are the two sockets
> powerclamped independently, or at the same time?  My guess was the
> former, but looking at the code again, it looks like the latter.
> So it is a good thing I asked, I guess.  ;-)

they are clamped together, and they have to.
you don't get (on the systems where this driver works) any "package" C state unless
all packages are idle completely.
And it's these package C states where the real deep power savings happen, that's
why they are such a juicy target for power clamping ;-)


  reply	other threads:[~2012-11-13 22:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 22:03 [PATCH 0/3] pm: Intel powerclamp driver Jacob Pan
2012-11-12 22:03 ` [PATCH 1/3] tick: export nohz tick idle symbols for module use Jacob Pan
2012-11-12 22:03 ` [PATCH 2/3] x86/nmi: export local_touch_nmi() symbol for modules Jacob Pan
2012-11-12 22:03 ` [PATCH 3/3] PM: Introduce Intel PowerClamp Driver Jacob Pan
2012-11-13  6:33   ` Joe Perches
2012-11-13  6:55     ` Jacob Pan
2012-11-13 21:16   ` Paul E. McKenney
2012-11-13 21:39     ` Jacob Pan
2012-11-13 22:23       ` Paul E. McKenney
2012-11-13 22:45         ` Arjan van de Ven [this message]
2012-11-13 23:02           ` Rafael J. Wysocki
2012-11-14  0:03             ` Paul E. McKenney
2012-11-14  0:03           ` Paul E. McKenney
2012-11-14  0:08             ` Arjan van de Ven
2012-11-14  1:14               ` Jacob Pan
2012-11-14  1:34                 ` Paul E. McKenney
2012-11-14  2:59                   ` Arjan van de Ven
2012-11-15  3:22                     ` Paul E. McKenney
2012-11-14  1:24             ` Jacob Pan
2012-11-13 21:56     ` Arjan van de Ven

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=50A2CD77.7000403@linux.intel.com \
    --to=arjan@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rob@landley.net \
    --cc=rui.zhang@intel.com \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).