public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael wang <wangyun@linux.vnet.ibm.com>
To: Rik van Riel <riel@redhat.com>,
	Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>, Alex Shi <alex.shi@linaro.org>,
	Paul Turner <pjt@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched: select 'idle' cfs_rq per task-group to prevent tg-internal imbalance
Date: Mon, 14 Jul 2014 09:29:25 +0800	[thread overview]
Message-ID: <53C33275.1000900@linux.vnet.ibm.com> (raw)
In-Reply-To: <53C00CC1.1030401@redhat.com>

On 07/12/2014 12:11 AM, Rik van Riel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
[snip]
>>
>> That's full wake balance.. if that was cheap,
>> select_idle_sibling() would not exist.
> 
> Full wake balance iterates over all the groups in the system,
> select_idle_sibling only over one LLC domain.

Furthermore, balance will calculate the load and do comparison, which
cost many cycles, while select_idle_sibling() just check idle status.

> 
> If no CPU in the LLC domain is idle, select_idle_sibling will
> iterate over all of them.  

Just the first cpu of groups, for example the cpu0:

sd1:
	tg0			tg1
	cpu0	cpu1		cpu2	cpu3
sd0:
	tg0	tg1
	cpu0	cpu1

The thing we'll check is:

sd1:
	idle_cpu(0)	//busy
	idle_cpu(2)	//busy
sd0:
	idle_cpu(0)	//busy

That's really cheap compared with balance path...

During this iteration, which the
> code already does, it should be possible to identify the least
> loaded of the CPUs and pick that one.

That will make select_idle_sibling() more close to balance path(just the
start domain lower), IMHO this seems like not such a good idea... what
we gain doesn't worth the overhead.

But if we have testing show this modify could benefit most of the
workloads (I don't think so but who knows...), then we'll have the
reason to add some load comparison logical inside that quick path ;-)

Regards,
Michael Wang

> 
> - -- 
> All rights reversed
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> 
> iQEcBAEBAgAGBQJTwAzBAAoJEM553pKExN6DlrEH/RKQPdAdMFK/pxZ/2f9TCXFK
> Vq25LWZeJQhNOrH3Q6VzTTfAG06O8+Bjxfb+SR6BOHCtD4kCBqaBdwVVUDXC+MbK
> NdBa3GtCT3ahvguiYLPEHL1vugND2yzHUgnr9EhUgk6zhnLxfvhIIJj7uv+ZRsri
> o8DsLrIG1jqDGVbbu5ssZ37w6cldoFBw0FAHcVAquoM2SP+/MuatW1SCkRP31IVL
> q0dssP1CD0Nkecz+S6WSI59c0Wt0c73oWNg/q41a/kha7RI1J5VF5yNFacq/uL0g
> Xxyb0mOiJarqMtzuq5ItlOiTry+BpqY1jFhN5ZhFjt9mtvpTR1C/tcXpOw77y0Y=
> =BEJk
> -----END PGP SIGNATURE-----
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


  reply	other threads:[~2014-07-14  1:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18  4:50 [PATCH] sched: select 'idle' cfs_rq per task-group to prevent tg-internal imbalance Michael wang
2014-06-23  9:42 ` Peter Zijlstra
2014-06-24  3:34   ` Michael wang
2014-07-01  8:20     ` Peter Zijlstra
2014-07-01  8:38       ` Michael wang
2014-07-01  8:56         ` Peter Zijlstra
2014-07-02  2:47           ` Michael wang
2014-07-02 12:49             ` Peter Zijlstra
2014-07-02 13:15               ` Peter Zijlstra
2014-07-03 16:29                 ` Nicolas Pitre
2014-07-03  2:09               ` Michael wang
2014-07-02 14:47         ` Rik van Riel
2014-07-03  2:16           ` Michael wang
2014-07-03  3:51           ` Mike Galbraith
2014-07-11 16:11             ` Rik van Riel
2014-07-14  1:29               ` Michael wang [this message]
2014-06-30  7:36 ` Michael wang
2014-06-30  8:06   ` Mike Galbraith
2014-06-30  8:47     ` Michael wang
2014-06-30  9:27       ` Mike Galbraith
2014-07-01  2:57         ` Michael wang
2014-07-01  5:41           ` Mike Galbraith
2014-07-01  6:10             ` 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=53C33275.1000900@linux.vnet.ibm.com \
    --to=wangyun@linux.vnet.ibm.com \
    --cc=alex.shi@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=riel@redhat.com \
    --cc=umgwanakikbuti@gmail.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