From: William Lee Irwin III <wli@holomorphy.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Buytaert_Steven@emc.com, linux-kernel@vger.kernel.org
Subject: Re: sched_yield proposals/rationale
Date: Thu, 12 Apr 2007 14:37:50 -0700 [thread overview]
Message-ID: <20070412213750.GF2986@holomorphy.com> (raw)
In-Reply-To: <p737ish90ss.fsf@bingen.suse.de>
On Thu, Apr 12, 2007 at 03:31:31PM +0200, Andi Kleen wrote:
> The only way I could think of to make sched_yield work the way they
> expect would be to define some way of gang scheduling and give
> sched_yield semantics that it preferably yields to other members
> of the gang.
> But it would be still hard to get these semantics (how to define
> the gangs) into your uncontrollable broken applications and also
> it has the risk of either unfairness or not full utilization of the
> machine. Getting it to scale well on MP systems would be also likely
> a challenge.
Gang scheduling isn't a squishy concept whose name can be arbitrarily
repurposed. Perhaps "group scheduling" or similar would be appropriate
if the standard gang scheduling semantics are not what you have in mind.
Standard gang scheduling would not be appropriate for applications that
don't know what they're doing. All threads of a gang falling asleep
when one sleeps (or more properly, the gang is considered either
runnable or unrunnable as a unit) is not to be taken lightly.
I'd call this something like a "directed yield with a group as a target,"
but I wouldn't actually try to do this. I'd try to provide ways for a
directed yield to donate remaining timeslice and dynamic priority if
possible to a particular task associated with a resource, for instance,
a futex or SysV semaphore owner. The priority inversion one desperately
wants to avoid is the resource owner running out of timeslice or
otherwise losing priority to where it falls behind busywaiters such as
callers of sched_yield for the purposes of multitier locking.
-- wli
prev parent reply other threads:[~2007-04-12 21:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-12 8:31 sched_yield proposals/rationale Buytaert_Steven
2007-04-12 9:48 ` Sven-Thorsten Dietrich
2007-04-12 13:31 ` Andi Kleen
2007-04-12 13:05 ` Buytaert_Steven
2007-04-12 13:27 ` Nick Piggin
2007-04-12 22:00 ` William Lee Irwin III
2007-04-12 13:31 ` Andi Kleen
2007-04-12 14:15 ` Buytaert_Steven
2007-04-12 21:04 ` Thomas Gleixner
2007-04-12 22:32 ` Bill Davidsen
2007-04-13 5:36 ` Buytaert_Steven
2007-04-13 19:46 ` Mark Lord
2007-04-17 19:37 ` Bill Davidsen
2007-04-18 5:40 ` Buytaert_Steven
2007-04-12 21:37 ` William Lee Irwin III [this message]
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=20070412213750.GF2986@holomorphy.com \
--to=wli@holomorphy.com \
--cc=Buytaert_Steven@emc.com \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
/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