public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Paul Jackson <pj@sgi.com>
Cc: akpm@linux-foundation.org, menage@google.com,
	linux-kernel@vger.kernel.org, dino@in.ibm.com, cpw@sgi.com,
	mingo@elte.hu
Subject: Re: [PATCH] cpuset and sched domains: sched_load_balance flag
Date: Tue, 2 Oct 2007 23:05:23 +1000	[thread overview]
Message-ID: <200710022305.23713.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <20070930204252.45e20bb4.pj@sgi.com>

On Monday 01 October 2007 13:42, Paul Jackson wrote:
> Nick wrote:
> > Moreover, sched_load_balance doesn't really sound like a good name
> > for asking for a partition.
>
> Yup - it's not a good name for asking for a partition.
>
> That's because it isn't asking for a partition.
>
> It's asking for load balancing over the CPUs in the cpuset so marked.

Yeah yeah OK, you turn it off in the parent cpuset of the child cpusets
which you want the partitioning to occur in, and ensure there are no
other overlapping cpusets with that flag turned on in order to create a
hard partition. I don't think this makes the API anynicer.


> > It's more like you're just asking to have better
> > load balancing over that set,
>
> Yup - it's asking for load balancing over that set.  That is why it is
> called that.  There's no idea here of better or worse load balancing,
> that's an internal kernel scheduler subtlety -- it's just a request that
> load balancing be done.

OK, if it prohibits balancing when sched_load_balance is 0, then it is
slightly more useful.


> That is what is visible to user space: whether or not tasks get moved
> from overloaded CPUs to underloaded, though still allowed, CPUs.
>
> This is visible to user space in two ways:
>   1) as task movemement, which may or may not be what is desired, and
>   2) as kernel CPU cycles spent, because load balancing costs CPU cycles
>      that increase more than linearly with the number of CPUs being
>      balanced.
>
> The user doesn't give a hoot what a 'sched domain' is.  They care to
> manage (1) whether their tasks might move under a load imbalance, and
> (2) how many CPU cycles the kernel spends providing this service.

Yeah, but the interface is not very nice. As an interface for hard
partitioning, it doesn't work nicely because it is hierarchical.


> > You would do this by creating partitioning cpusets which carve up the
> > root cpuset (basically -- have multiple roots).
>
> You would do this with the current, single rooted cpuset (and now
> cgroup) mechanism by having multiple immediate child cpusets of the
> root cpuset, which partition the system CPUs.  There is no need to
> invent some bastardized multiple root structure.

What do you mean by bastardized? What's wrong with having a real
(and sane) representation of the requested hard-partitions in the system?


> > You can't (easily) do this now because you have so many tasks in the
> > root cpuset that it is impossible to know whether or not you
> > actually want to load balance them.
>
> I don't know what proposal you are reacting to here.  Clearly not this
> patch that I have proposed, as it is trivially easy to indicate whether
> you want to load balance the root cpuset - by setting or clearing the
> 'sched_load_balance' flag in the root cpuset.

Not your proposal, just the idea to have enough information to be able
to work out a more optimal set of sched-domains automatically. Actually
we can do most of it already automatically, but not hard partitioning.

[snip]

As I said, neither is really semantically more powerful than the other. So
yeah those things are possible to do with your API, but I don't like the API.

  reply	other threads:[~2007-10-03  5:37 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-30 10:44 [PATCH] cpuset and sched domains: sched_load_balance flag Paul Jackson
2007-09-29 19:21 ` Nick Piggin
2007-09-30 18:07   ` Paul Jackson
2007-09-30  3:34     ` Nick Piggin
2007-10-01  3:42       ` Paul Jackson
2007-10-02 13:05         ` Nick Piggin [this message]
2007-10-03  6:58           ` Paul Jackson
2007-10-02 16:09             ` Nick Piggin
2007-10-03  9:55               ` Paul Jackson
2007-10-02 17:56                 ` Nick Piggin
2007-10-03 11:38                   ` Paul Jackson
2007-10-02 19:25                     ` Nick Piggin
2007-10-03 12:14                       ` Paul Jackson
2007-10-02 19:53                         ` Nick Piggin
2007-10-03 12:41                           ` Paul Jackson
2007-10-02 20:30                             ` Nick Piggin
2007-10-03 17:46                               ` Paul Jackson
2007-10-03 12:17                   ` Paul Jackson
2007-10-02 20:31                     ` Nick Piggin
2007-10-03 17:44                       ` Paul Jackson
2007-10-01 18:15       ` Paul Jackson
2007-10-02 13:35         ` Nick Piggin
2007-10-03  6:22           ` [patch] sched: fix sched-domains partitioning by cpusets Ingo Molnar
2007-10-03  6:56             ` Paul Jackson
2007-10-02 15:46               ` Nick Piggin
2007-10-03  9:21                 ` Paul Jackson
2007-10-02 17:23                   ` Nick Piggin
2007-10-03 10:08                     ` Paul Jackson
2007-10-03  9:35                   ` Ingo Molnar
2007-10-03  9:39                     ` Paul Jackson
2007-10-02 17:29                       ` Nick Piggin
2007-10-03  7:20               ` Ingo Molnar
2007-10-03  7:25           ` [PATCH] cpuset and sched domains: sched_load_balance flag Paul Jackson
2007-10-02 16:14             ` Nick Piggin
2007-09-30 10:44 ` [PATCH] cpuset decrustify update and validate masks Paul Jackson
2007-09-30 17:33 ` [PATCH] cpuset and sched domains: sched_load_balance flag Ingo Molnar
2007-10-02 20:22 ` Randy Dunlap
2007-10-02 20:57   ` Paul Jackson

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=200710022305.23713.nickpiggin@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=cpw@sgi.com \
    --cc=dino@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=mingo@elte.hu \
    --cc=pj@sgi.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