All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Michael Wang <wangyun@linux.vnet.ibm.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	linux-kernel@vger.kernel.org,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	tglx@linutronix.de
Subject: Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state
Date: Fri, 01 Feb 2013 17:53:25 +0900	[thread overview]
Message-ID: <87zjzos9dm.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <510A320D.8010301@linux.vnet.ibm.com> (Michael Wang's message of "Thu, 31 Jan 2013 16:57:49 +0800")

Hi Michael,

On Thu, 31 Jan 2013 16:57:49 +0800, Michael Wang wrote:
> On 01/31/2013 04:45 PM, Michael Wang wrote:
>> On 01/31/2013 04:24 PM, Michael Wang wrote:
>>> On 01/31/2013 03:40 PM, Namhyung Kim wrote:
>>>> On Thu, 31 Jan 2013 15:30:02 +0800, Michael Wang wrote:
>>>>> On 01/31/2013 02:58 PM, Namhyung Kim wrote:
>>>>>> But AFAIK the number of states in cpuidle is usually less than 10 so maybe
>>>>>> we can change the weight then, but there's no promise...
>>>>>
>>>>> And I just got another case we should take care:
>>>>>
>>>>> 	group 0		cpu 0			cpu 1
>>>>> 			power index 8		power index 8
>>>>>
>>>>>
>>>>> 	group 1		cpu 2			cpu 3
>>>>> 			power index 0		load 15
>>>>>
>>>>> so load of group 0 is 16 and group 1 is 15, but group 0 is better...
>>>>
>>>> Maybe it's not.  The cpus in group 0 are in a lower power state so that
>>>> there will be a benefit to select cpu 2 from the power' PoV IMHO.  Also
>>>> such a low power state has a longer exit latency so that we should
>>>> choose cpu2 to get a better performance and it's the basic idea of this
>>>> patchset I believe.
>>>
>>> Well, this case is just to notify that, we may face the comparison
>>> between load and index, not between index and index, I just doubt there
>>> won't be a rule which could take care both, besides, comparison between
>>> load and index is strange...
>> 
>> Oh, I miss the point that you call it 'idle load', hmm...may be it could
>> works, if we could scale the current load number, then we will have more
>> 'space' for 'idle load'.
>
> And some tips here:
>
> /*      
>  * Increase resolution of nice-level calculations for 64-bit architectures.
>  * The extra resolution improves shares distribution and load balancing of
>  * low-weight task groups (eg. nice +19 on an autogroup), deeper taskgroup
>  * hierarchies, especially on larger systems. This is not a user-visible change
>  * and does not change the user-interface for setting shares/weights.
>  *      
>  * We increase resolution only if we have enough bits to allow this increased
>  * resolution (i.e. BITS_PER_LONG > 32). The costs for increasing resolution
>  * when BITS_PER_LONG <= 32 are pretty high and the returns do not justify the
>  * increased costs.
>  */
> #if 0 /* BITS_PER_LONG > 32 -- currently broken: it increases power usage under light load  */
> # define SCHED_LOAD_RESOLUTION  10
> # define scale_load(w)          ((w) << SCHED_LOAD_RESOLUTION)
> # define scale_load_down(w)     ((w) >> SCHED_LOAD_RESOLUTION)
>
> It mentioned some regressions, that's the history but
> sounds like a lot of testing is needed.

Thanks for the tip.  Yes, I was aware of this and bit worried about the
mentioned regression.  So I just wanted to increate the load weight of a
SCHED_IDLE task.

However I don't have a good test environment unfortunately so cannot
carry the work on at least for a while.

Thanks for your help anyway,
Namhyung

  reply	other threads:[~2013-02-01  8:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30 21:19 [RFC] Consider CPU idle state while choosing a new CPU Sebastian Andrzej Siewior
2013-01-30 21:19 ` [RFC 1/2] cpuidle: trace state of the CPU Sebastian Andrzej Siewior
2013-01-31  5:21   ` Namhyung Kim
2013-02-02 17:35     ` Sebastian Andrzej Siewior
2013-01-30 21:19 ` [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state Sebastian Andrzej Siewior
2013-01-31  2:12   ` Michael Wang
2013-01-31  5:16     ` Namhyung Kim
2013-01-31  6:39       ` Michael Wang
2013-01-31  6:58         ` Namhyung Kim
2013-01-31  7:30           ` Michael Wang
2013-01-31  7:40             ` Namhyung Kim
2013-01-31  8:24               ` Michael Wang
2013-01-31  8:45                 ` Michael Wang
2013-01-31  8:57                   ` Michael Wang
2013-02-01  8:53                     ` Namhyung Kim [this message]
2013-02-02 17:50     ` Sebastian Andrzej Siewior
2013-02-04  3:01       ` Michael Wang

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=87zjzos9dm.fsf@sejong.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=tglx@linutronix.de \
    --cc=wangyun@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.