From: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Arjan van de Ven <arjan@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
mingo@elte.hu, LKML <linux-kernel@vger.kernel.org>
Subject: Re: sched_yield: delete sysctl_sched_compat_yield
Date: Fri, 30 Nov 2007 11:15:27 +0800 [thread overview]
Message-ID: <1196392527.25646.65.camel@ymzhang> (raw)
In-Reply-To: <200711301346.22573.nickpiggin@yahoo.com.au>
On Fri, 2007-11-30 at 13:46 +1100, Nick Piggin wrote:
> On Wednesday 28 November 2007 09:57, Arjan van de Ven wrote:
> > On Tue, 27 Nov 2007 17:33:05 +0800
> >
> > "Zhang, Yanmin" <yanmin_zhang@linux.intel.com> wrote:
> > > If echo "1">/proc/sys/kernel/sched_compat_yield before starting
> > > volanoMark testing, the result is very good with kernel 2.6.24-rc3 on
> > > my 16-core tigerton.
> > >
> > > 1) If /proc/sys/kernel/sched_compat_yield=1, comparing with 2.6.22,
> > > 2.6.24-rc3 has more than 70% improvement;
> > > 2) If /proc/sys/kernel/sched_compat_yield=0, comparing with 2.6.22,
> > > 2.6.24-rc3 has more than 80% regression;
> > >
> > > On other machines, the volanoMark result also has much improvement if
> > > /proc/sys/kernel/sched_compat_yield=1.
> > >
> > > Would you like to change function yield_task_fair to delete codes
> > > around sysctl_sched_compat_yield, or just initiate it to 1?
> >
> > sounds like a bad idea; volanomark (well, technically the jvm behind
> > it) is abusing sched_yield() by assuming it does something it really
> > doesn't do, and as it happens some of the earlier 2.6 schedulers
> > accidentally happened to behave in a way that was nice for this
> > benchmark.
>
> OK, why is this still happening? Haven't we been asking JVMs to use
> futexes or posix locking for years and years now? Are there any sane
> jvms that _don't_ use yield?
I think it's an issue of volanomark (a kind of java application) instead of JVM.
>
>
> > Todays kernel has a different behavior somewhat (and before people
> > scream "regression"; sched_yield() behavior isn't really specified and
> > doesn't make any sense at all, whatever you get is what you get....
> > it's pretty much an insane defacto behavior that is incredibly tied to
> > which decisions the scheduler makes how, and no app can depend on that
>
> It is a performance regression. Is there any reason *not* to use the
> "compat" yield by default?
There is no, so I suggest to set sched_compat_yield=1 by default.
If sched_compat_yield=0, kernel almost does nothing but returns. When
sched_compat_yield=1, it is closer to the meaning of sched_yield man page.
> As you say, for SCHED_OTHER tasks, yield
> can do almost anything. We may as well do something that isn't a
> regression...
I just found SCHED_OTHER in man sched_setscheduler. Is it SCHED_NORMAL in
the latest kernel?
>
>
> > in any way. In fact, I've proposed to make sched_yield() just do an
> > msleep(1)... that'd be closer to what sched_yield is supposed to do
> > standard wise than any of the current behaviors .... ;_
>
> What makes you say that? IIRC of all the things that sched_yeild can
> do, it is not allowed to block. So this is about the only thing that
> will break the standard...
next prev parent reply other threads:[~2007-11-30 3:16 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 9:33 Zhang, Yanmin
2007-11-27 11:17 ` Ingo Molnar
2007-11-27 22:57 ` Arjan van de Ven
2007-11-30 2:46 ` Nick Piggin
2007-11-30 2:51 ` Arjan van de Ven
2007-11-30 3:02 ` Nick Piggin
2007-11-30 3:15 ` Zhang, Yanmin [this message]
2007-11-30 3:29 ` Nick Piggin
2007-11-30 4:32 ` Zhang, Yanmin
2007-11-30 10:08 ` Ingo Molnar
2007-12-03 4:27 ` Nick Piggin
2007-12-03 8:45 ` Ingo Molnar
2007-12-03 9:17 ` Nick Piggin
2007-12-03 9:35 ` Zhang, Yanmin
2007-12-03 9:57 ` Ingo Molnar
2007-12-03 10:15 ` Nick Piggin
2007-12-03 10:33 ` Ingo Molnar
2007-12-03 11:02 ` Nick Piggin
2007-12-03 11:37 ` Ingo Molnar
2007-12-03 17:04 ` David Schwartz
2007-12-03 17:37 ` Chris Friesen
2007-12-03 19:12 ` David Schwartz
2007-12-03 19:56 ` Chris Friesen
2007-12-03 21:39 ` Mark Lord
2007-12-03 21:48 ` Ingo Molnar
2007-12-03 21:57 ` Mark Lord
2007-12-03 22:05 ` Ingo Molnar
2007-12-03 22:18 ` Mark Lord
2007-12-03 22:33 ` Ingo Molnar
2007-12-04 0:18 ` Nick Piggin
2007-12-04 0:30 ` David Schwartz
2007-12-04 2:09 ` Nick Piggin
2007-12-04 1:02 ` Nick Piggin
2007-12-03 9:41 ` Zhang, Yanmin
2007-12-03 10:17 ` Ingo Molnar
2007-12-03 9:29 ` Zhang, Yanmin
2007-12-03 10:05 ` Ingo Molnar
2007-12-04 6:40 ` Zhang, Yanmin
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=1196392527.25646.65.camel@ymzhang \
--to=yanmin_zhang@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
/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
all inboxes | Powered by JetHome®