All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: "'Christoph Lameter'" <clameter@sgi.com>
Cc: "Ingo Molnar" <mingo@elte.hu>,
	"Siddha, Suresh B" <suresh.b.siddha@intel.com>, <akpm@osdl.org>,
	<mm-commits@vger.kernel.org>, <nickpiggin@yahoo.com.au>,
	<linux-kernel@vger.kernel.org>
Subject: RE: + sched-use-tasklet-to-call-balancing.patch added to -mm tree
Date: Sun, 12 Nov 2006 20:03:51 -0800	[thread overview]
Message-ID: <000001c706d8$bcce0770$a081030a@amr.corp.intel.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0611101847050.28621@schroedinger.engr.sgi.com>

Christoph Lameter wrote on Friday, November 10, 2006 6:51 PM
> On Fri, 10 Nov 2006, Chen, Kenneth W wrote:
> 
> > So designate only one CPU within a domain to do load balance between groups
> > for that specific sched domain should in theory fix the 2nd problem you
> > identified.  Did you get a chance to look at the patch Suresh posted?
> 
> Yes, I am still thinking about how this would work. This would mean that 
> the first cpu on a system would move busy processes to itself from all 
> 1023 other processes? That does not sound appealing.
> 
> Processes in the allnodes domain would move to processor #0. The next 
> lower layer are the nodes groups. Not all of the groups at that layer 
> contain processor #0. So we would never move processes into those sched 
> domains?

Not really, someone needs to put a bloody comments in that patch ;-)

The key is that load balance scans from lowest SMT domain and traverse
upwards to numa allnodes domain.  The CPU check and break is placed at
the end of the for loop so it is effectively shorting out i+1 iteration.
And given the fact that sd->span in iteration(i) is the same as sd->groups
in iteration(i+1).  The patch is effectively designate first CPU (hard-coded)
in a group within a domain to perform load balance in that domain.  All
other groups within a domain will still have at least one CPU assigned to
perform load balance.

Though the original patch is not perfect:

(1) we should extend the logic to all rebalance tick, not just busy tick.
(2) we should initiate load balance within a domain only from least
    loaded group.
(3) the load scanning should be done only once per interval per domain.
    Currently, it is scanning load for each CPU within a domain.  Even with
    the patch, the scanning is cut down to one per group. That is still
    too much.  Large system that has hundreds of groups in numa allnodes
    will end up scanning / calculate load over and over again. That should
    be cut down as well.

Part of all this problem probably stemmed from "load balance" is incapable
of performing l-d between arbitrary pair of CPUs, and tightly tied load scan
and actual l-d action.  And on top of that l-d is really a pull operation
to current running CPU. All these limitations dictate that every CPU somehow
has to scan and pull.  It is extremely inefficient on large system.

IMO, we should decouple load scan from actual l-d action and if possible,
make l-d capable of performing on arbitrary pair of CPUs.


  reply	other threads:[~2006-11-13  4:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200611032205.kA3M5wmJ003178@shell0.pdx.osdl.net>
2006-11-07  7:32 ` + sched-use-tasklet-to-call-balancing.patch added to -mm tree Ingo Molnar
2006-11-07 17:44   ` Christoph Lameter
2006-11-07 17:31     ` Siddha, Suresh B
2006-11-07 17:55       ` Christoph Lameter
2006-11-07 17:50         ` Siddha, Suresh B
2006-11-07 18:18           ` Christoph Lameter
2006-11-07 19:17           ` Christoph Lameter
2006-11-07 20:31             ` Ingo Molnar
2006-11-07 20:59               ` Christoph Lameter
2006-11-07 21:35                 ` Chen, Kenneth W
2006-11-07 21:49                   ` Christoph Lameter
2006-11-10  6:18                     ` Chen, Kenneth W
2006-11-10 18:50                       ` Christoph Lameter
2006-11-10 21:38                         ` Ingo Molnar
2006-11-11  1:01                           ` Christoph Lameter
2006-11-11  2:05                             ` Chen, Kenneth W
2006-11-11  2:51                               ` Christoph Lameter
2006-11-13  4:03                                 ` Chen, Kenneth W [this message]
2006-11-13  5:44                                   ` Christoph Lameter
2006-11-13  6:40                                     ` Chen, Kenneth W
2006-11-14  1:06                                       ` [patch] sched domain: move sched group allocations to percpu area Siddha, Suresh B
2006-11-14  8:23                                         ` Ingo Molnar
2006-11-14 16:57                                         ` Christoph Lameter
2006-11-10 21:42                         ` + sched-use-tasklet-to-call-balancing.patch added to -mm tree Ingo Molnar
2006-11-10 22:32                         ` Siddha, Suresh B
2006-11-11  1:14                           ` Christoph Lameter
2006-11-07 19:22           ` Christoph Lameter
2006-11-07 20:29         ` Ingo Molnar

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='000001c706d8$bcce0770$a081030a@amr.corp.intel.com' \
    --to=kenneth.w.chen@intel.com \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mm-commits@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=suresh.b.siddha@intel.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.