From: Paul Jackson <pj@sgi.com>
To: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] Customize sched domain via cpuset
Date: Tue, 1 Apr 2008 06:55:34 -0500 [thread overview]
Message-ID: <20080401065534.a6267b96.pj@sgi.com> (raw)
In-Reply-To: <47F21BE3.5030705@jp.fujitsu.com>
Interesting ...
So, we have two flags here. One flag "sched_wake_idle_far" that will
cause the current task to search farther for an idle CPU when it wakes
up another task that needs a CPU on which to run, and the other flag
"sched_balance_newidle_far" that will cause a soon-to-idle CPU to search
farther for a task it might pull over and run, instead of going idle.
I am tempted to ask if we should not elaborate this in one dimension,
and simplify it in another dimension.
First the simplification side: do we need both flags? Yes, they are
two distinct cases in the code, but perhaps practical uses will always
end up setting both flags the same way. If that's the case, then we
are just burdening the user of these flags with understanding a detail
that didn't matter to them: did a waking task or an idle CPU provoke
the search? Do you have or know of a situation where you actually
desire to enable one flag while disabling the other?
For the elaboration side: your proposal has just two-level's of
distance, near and far. Perhaps, as architectures become more
elaborate and hierarchies deeper, we would want N-level's of distance,
and the ability to request such load balancing for all levels "n"
for our choice of "n" <= N.
If we did both the above, then we might have a single per-cpuset file
that took an integer value ... this "n". If (n == 0), that might mean
no such balancing at all. If (n == 1), that might mean just the
nearest balancing, for example, to the hyperthread within the same core,
on some current Intel architectures. If (n == 2), then that might mean,
on the same architectures, that balancing could occur across cores
within the same package. If (n == 3) then that might mean, again on
that architecture, that balancing could occur across packages on the
same node board. As architectures evolve over time, the exact details
of what each value of "n" mean would evolve, but always higher "n"
would enable balancing across a wider portion of the system.
Please understand I am just brain storming here. I don't know that
the alternatives I considered above are preferrable or not to what
your patch presents.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.940.382.4214
next prev parent reply other threads:[~2008-04-01 11:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 11:26 [PATCH 1/2] Customize sched domain via cpuset Hidetoshi Seto
2008-04-01 11:40 ` Andi Kleen
2008-04-01 11:56 ` Peter Zijlstra
2008-04-01 13:29 ` Andi Kleen
2008-04-01 13:38 ` Peter Zijlstra
2008-04-01 11:48 ` Peter Zijlstra
2008-04-01 11:55 ` Paul Jackson [this message]
2008-04-01 11:59 ` Peter Zijlstra
2008-04-02 8:39 ` Hidetoshi Seto
2008-04-02 11:14 ` Paul Jackson
2008-04-03 3:21 ` Hidetoshi Seto
2008-04-03 10:46 ` Peter Zijlstra
2008-04-03 12:56 ` Paul Jackson
2008-04-03 13:14 ` Paul Jackson
2008-04-04 9:10 ` [PATCH 1/2] Customize sched domain via cpuset (v2) Hidetoshi Seto
2008-04-04 9:11 ` [PATCH 2/2] " Hidetoshi Seto
2008-04-10 14:53 ` Peter Zijlstra
2008-04-14 1:45 ` Hidetoshi Seto
2008-04-14 15:38 ` 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=20080401065534.a6267b96.pj@sgi.com \
--to=pj@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=seto.hidetoshi@jp.fujitsu.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.