From: Peter Williams <pwil3058@bigpond.net.au>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: vatsa@in.ibm.com, Kirill Korotaev <dev@sw.ru>,
Nick Piggin <nickpiggin@yahoo.com.au>,
tingy@cs.umass.edu, ckrm-tech@lists.sourceforge.net,
Balbir Singh <balbir@in.ibm.com>,
efault@gmx.de, kernel@kolivas.org, linux-kernel@vger.kernel.org,
tong.n.li@intel.com, containers@lists.osdl.org,
Ingo Molnar <mingo@elte.hu>,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
Guillaume Chazarain <guichaz@yahoo.fr>
Subject: Re: [ckrm-tech] [RFC] [PATCH 0/3] Add group fairness to CFS
Date: Wed, 30 May 2007 10:09:28 +1000 [thread overview]
Message-ID: <465CC0B8.8050507@bigpond.net.au> (raw)
In-Reply-To: <20070529104805.GC31925@holomorphy.com>
William Lee Irwin III wrote:
> William Lee Irwin III wrote:
>>> Lag should be considered in lieu of load because lag
>
> On Sun, May 27, 2007 at 11:29:51AM +1000, Peter Williams wrote:
>> What's the definition of lag here?
>
> Lag is the deviation of a task's allocated CPU time from the CPU time
> it would be granted by the ideal fair scheduling algorithm (generalized
> processor sharing; take the limit of RR with per-task timeslices
> proportional to load weight as the scale factor approaches zero).
Over what time period does this operate?
> Negative lag reflects receipt of excess CPU time. A close-to-canonical
> "fairness metric" is the maximum of the absolute values of the lags of
> all the tasks on the system. The "signed minimax pseudonorm" is the
> largest lag without taking absolute values; it's a term I devised ad
> hoc to describe the proposed algorithm.
So what you're saying is that you think dynamic priority (or its
equivalent) should be used for load balancing instead of static priority?
>
> William Lee Irwin III wrote:
>>> is what the
>>> scheduler is trying to minimize;
>
> On Sun, May 27, 2007 at 11:29:51AM +1000, Peter Williams wrote:
>> This isn't always the case. Some may prefer fairness to minimal lag.
>> Others may prefer particular tasks to receive preferential treatment.
>
> This comment does not apply. Generalized processor sharing expresses
> preferential treatment via weighting. Various other forms of
> preferential treatment require more elaborate idealized models.
This was said before I realized that your "lag" is just a measure of
fairness.
>
>
>>> load is not directly relevant, but
>>> appears to have some sort of relationship. Also, instead of pinned,
>>> unpinned should be considered.
>
> On Sun, May 27, 2007 at 11:29:51AM +1000, Peter Williams wrote:
>> If you have total and pinned you can get unpinned. It's probably
>> cheaper to maintain data for pinned than unpinned as there's less of it
>> on normal systems.
>
> Regardless of the underlying accounting,
I was just replying to your criticism of my suggestion to keep pinned
task statistics and use them.
> I've presented a coherent
> algorithm. It may be that there's no demonstrable problem to solve.
> On the other hand, if there really is a question as to how to load
> balance in the presence of tasks pinned to cpus, I just answered it.
Unless I missed something there's nothing in your suggestion that does
anything more about handling pinned tasks than is already done by the
load balancer.
>
>
> William Lee Irwin III wrote:
>>> Using the signed minimax pseudonorm (i.e. the highest
>>> signed lag, where positive is higher than all negative regardless of
>>> magnitude) on unpinned lags yields a rather natural load balancing
>>> algorithm consisting of migrating from highest to lowest signed lag,
>>> with progressively longer periods for periodic balancing across
>>> progressively higher levels of hierarchy in sched_domains etc. as usual.
>>> Basically skip over pinned tasks as far as lag goes.
>>> The trick with all that comes when tasks are pinned within a set of
>>> cpus (especially crossing sched_domains) instead of to a single cpu.
>
> On Sun, May 27, 2007 at 11:29:51AM +1000, Peter Williams wrote:
>> Yes, this makes the cost of maintaining the required data higher which
>> makes keeping pinned data more attractive than unpinned.
>> BTW keeping data for sets of CPU affinities could cause problems as the
>> number of possible sets is quite large (being 2 to the power of the
>> number of CPUs). So you need an algorithm based on pinned data for
>> single CPUs that knows the pinning isn't necessarily exclusive rather
>> than one based on sets of CPUs. As I understand it (which may be
>> wrong), the mechanism you describe below takes that approach.
>
> Yes, the mechanism I described takes that approach.
>
>
> William Lee Irwin III wrote:
>>> The smpnice affair is better phrased in terms of task weighting. It's
>>> simple to honor nice in such an arrangement. First unravel the
>>> grouping hierarchy, then weight by nice. This looks like
> [...]
>>> In such a manner nice numbers obey the principle of least surprise.
>
> On Sun, May 27, 2007 at 11:29:51AM +1000, Peter Williams wrote:
>> Is it just me or did you stray from the topic of handling cpu affinity
>> during load balancing to hierarchical load balancing? I couldn't see
>> anything in the above explanation that would improve the handling of cpu
>> affinity.
>
> There was a second issue raised to which I responded. I didn't stray
> per se. I addressed a second topic in the post.
OK.
To reiterate, I don't think that my suggestion is really necessary. I
think that the current load balancing (stand fast a small bug that's
being investigated) will come up with a good distribution of tasks to
CPUs within the constraints imposed by any CPU affinity settings.
Peter
--
Peter Williams pwil3058@bigpond.net.au
"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce
next prev parent reply other threads:[~2007-05-30 0:09 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-23 16:48 Srivatsa Vaddagiri
2007-05-23 16:51 ` [RFC] [PATCH 1/3] task_cpu(p) needs to be correct always Srivatsa Vaddagiri
2007-05-23 16:54 ` [RFC] [PATCH 2/3] Introduce two new structures - struct lrq and sched_entity Srivatsa Vaddagiri
2007-05-23 16:56 ` [RFC] [PATCH 3/3] Generalize CFS core and provide per-user fairness Srivatsa Vaddagiri
2007-05-23 18:32 ` [RFC] [PATCH 0/3] Add group fairness to CFS Ingo Molnar
2007-05-25 7:59 ` Srivatsa Vaddagiri
[not found] ` <3d8471ca0705231112rfac9cfbt9145ac2da8ec1c85@mail.gmail.com>
[not found] ` <20070523183824.GA7388@elte.hu>
[not found] ` <4654BF88.3030404@yahoo.fr>
2007-05-25 7:45 ` Srivatsa Vaddagiri
2007-05-25 8:29 ` Ingo Molnar
2007-05-25 10:56 ` Srivatsa Vaddagiri
2007-05-25 11:11 ` Ingo Molnar
2007-05-25 11:28 ` Srivatsa Vaddagiri
2007-05-25 12:05 ` Ingo Molnar
2007-05-25 12:41 ` Srivatsa Vaddagiri
2007-05-25 13:05 ` Kirill Korotaev
2007-05-25 15:34 ` [ckrm-tech] " Srivatsa Vaddagiri
2007-05-25 16:18 ` Kirill Korotaev
2007-05-25 18:08 ` Srivatsa Vaddagiri
2007-05-26 0:17 ` Peter Williams
2007-05-26 15:41 ` William Lee Irwin III
2007-05-27 1:29 ` Peter Williams
2007-05-29 10:48 ` William Lee Irwin III
2007-05-30 0:09 ` Peter Williams [this message]
2007-05-30 2:48 ` William Lee Irwin III
2007-05-30 4:07 ` Peter Williams
2007-05-30 17:14 ` Srivatsa Vaddagiri
2007-05-30 20:13 ` William Lee Irwin III
2007-05-31 3:26 ` Srivatsa Vaddagiri
2007-05-31 4:09 ` William Lee Irwin III
2007-05-31 5:48 ` Srivatsa Vaddagiri
2007-05-31 6:36 ` William Lee Irwin III
2007-05-31 8:33 ` Srivatsa Vaddagiri
2007-05-31 8:43 ` William Lee Irwin III
2007-05-31 8:56 ` Srivatsa Vaddagiri
2007-05-31 9:15 ` William Lee Irwin III
2007-05-31 9:36 ` Srivatsa Vaddagiri
2007-05-28 17:26 ` Srivatsa Vaddagiri
2007-05-29 0:18 ` Peter Williams
2007-05-29 1:55 ` Paul Menage
2007-05-29 3:30 ` Peter Williams
2007-05-25 9:30 ` Guillaume Chazarain
[not found] ` <20070523180316.GY19966@holomorphy.com>
2007-05-25 16:14 ` Srivatsa Vaddagiri
2007-05-25 17:14 ` Li, Tong N
2007-05-28 16:39 ` [ckrm-tech] " Srivatsa Vaddagiri
2007-05-30 0:14 ` Bill Huey
2007-05-30 2:51 ` William Lee Irwin III
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=465CC0B8.8050507@bigpond.net.au \
--to=pwil3058@bigpond.net.au \
--cc=akpm@linux-foundation.org \
--cc=balbir@in.ibm.com \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=containers@lists.osdl.org \
--cc=dev@sw.ru \
--cc=efault@gmx.de \
--cc=guichaz@yahoo.fr \
--cc=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=tingy@cs.umass.edu \
--cc=tong.n.li@intel.com \
--cc=torvalds@linux-foundation.org \
--cc=vatsa@in.ibm.com \
--cc=wli@holomorphy.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
Powered by JetHome