public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@linux.intel.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Vladimir Davydov <vdavydov@parallels.com>,
	Ingo Molnar <mingo@elte.hu>, Len Brown <lenb@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpuidle: menu: use nr_running instead of cpuload for calculating perf mult
Date: Mon, 04 Jun 2012 10:25:40 -0700	[thread overview]
Message-ID: <4FCCEF94.6010805@linux.intel.com> (raw)
In-Reply-To: <1338830167.28282.115.camel@twins>

>> what the logic is trying to do, on a 10 km level, is to limit the damage
>> of accumulated C state exit time.
>> (I'll avoid the word "latency" here, since the real time people will
>> then immediately think this is about controlling latency response, which
>> it isn't)
> 
> But why? There's a natural limit to his, say the wakeup costs 0.2ms then
> you can only do 5k of those a second. Once you need to actually do some
> work as well this comes down.

but if you only do 100 per second, you still burn 20 msec, which can be
too much if you're performance sensitive.


> But its all idle time, you cannot be idle longer than there is a lack of
> work. So if you're idle too long (because of long exit latency) your
> work shifts and the future idle time reduces, eventually causing a lower
> C state to be used.
> 
> Also, when you notice you're waking up too soon, you can quickly ramp
> down on the C state levels.

when wakeups happen too soon, this already happens.
but that's orthogonal to some degree unfortunately.

> 
>> Now, if you're very idle for a sustained duration (e.g. low load),
>> you're assumed not sensitive to a bit of performance cost.
>> but if you're actually busy (over a longer period, not just "right
>> now"), you're assumed to be sensitive to the performance cost,
>> and what the algorithm does is make it less easy to go into the
>> expensive states.
> 
> My brain still sparks and fizzles when I read that.. it just doesn't
> compute.
> 
> What performance? performance isn't a well defined word.

for the sake of argument, lets call it the amount of work the system can
get done. (where 'work' is obviously still vague, but the software
running on the system will know what it is).

can you afford to do no work for those 20 msec every second ?
the answer to that will be "it depends", and estimating that "depends"
is what the load average value is used for.

I will totally accept that the value used right now is not the optimal
or correct value to use (as you said, the "top" type load average is not
available, which would have been much nicer).

  reply	other threads:[~2012-06-04 17:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04 10:24 [PATCH] cpuidle: menu: use nr_running instead of cpuload for calculating perf mult Vladimir Davydov
2012-06-04 10:32 ` Peter Zijlstra
2012-06-04 10:50   ` Vladimir Davydov
2012-06-04 13:13   ` Arjan van de Ven
2012-06-04 13:45     ` Peter Zijlstra
2012-06-04 13:48       ` Arjan van de Ven
2012-06-04 15:08         ` Peter Zijlstra
2012-06-04 15:14           ` Arjan van de Ven
2012-06-04 15:26             ` Peter Zijlstra
2012-06-04 15:39               ` Arjan van de Ven
2012-06-04 16:33                 ` Peter Zijlstra
2012-06-04 16:53                   ` Arjan van de Ven
2012-06-04 17:08                     ` Vladimir Davydov
2012-06-04 17:17                       ` Peter Zijlstra
2012-06-04 17:16                     ` Peter Zijlstra
2012-06-04 17:25                       ` Arjan van de Ven [this message]
2012-06-04 20:31                         ` Peter Zijlstra
2012-06-04 20:45                           ` Arjan van de Ven
2012-06-04 21:14                             ` Peter Zijlstra
2012-06-04 20:40                     ` Peter Zijlstra
2012-06-05  3:48                 ` Mike Galbraith
2012-06-04 13:15 ` Arjan van de Ven
2012-06-04 13:19   ` Vladimir Davydov
2012-11-27 19:02 ` Vladimir Davydov

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=4FCCEF94.6010805@linux.intel.com \
    --to=arjan@linux.intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=vdavydov@parallels.com \
    /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