All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Buytaert_Steven@emc.com
Cc: andi@firstfloor.org, linux-kernel@vger.kernel.org
Subject: Re: sched_yield proposals/rationale
Date: Thu, 12 Apr 2007 23:27:22 +1000	[thread overview]
Message-ID: <461E33BA.2030104@yahoo.com.au> (raw)
In-Reply-To: <585DC2133F7C974F87D4EC432896F1720309F3DB@CORPUSMX10A.corp.emc.com>

Buytaert_Steven@emc.com wrote:
>>-----Original Message-----
>>From: Andi Kleen
>>[ ... about use of sched_yield ...]
>>On the other hand when they fix their code to not rely on sched_yield
>>but use [...]
> 
> 
> Agreed, but $ find . -name "*.[ch]" | xargs grep -E "yield[ ]*\(" | wc over
> the 2.6.16 kernel yields 105 hits, note including comments...

Most of these (in core code, anyway) seem to use yield when they really don't
care about running for a while.

> An interesting spot is e.g. fs/buffer.c free_more_memory()

This one should be pretty rare (actually I think it is dead code in practice,
due to the way the page allocator works).

Avoiding sched_yield is a really good idea outside realtime scheduling. Since
we have gone this far with the current semantics, I think it would be sad to
back down now.

It would be nice if you could pressure those other components to adapt :)

-- 
SUSE Labs, Novell Inc.

  reply	other threads:[~2007-04-12 13:27 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 [this message]
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

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=461E33BA.2030104@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --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 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.