Messages in this thread |  | | | Subject | Re: sched_yield: delete sysctl_sched_compat_yield | | From | "Zhang, Yanmin" <> | | Date | Mon, 03 Dec 2007 17:41:09 +0800 |
On Mon, 2007-12-03 at 09:45 +0100, Ingo Molnar wrote:
> * Nick Piggin <nickpiggin@yahoo.com.au> wrote:
>
> > On Friday 30 November 2007 21:08, Ingo Molnar wrote:
> > > * Nick Piggin <nickpiggin@yahoo.com.au> wrote:
> > > > Haven't we been asking JVMs to use futexes or posix locking for years
> > > > and years now? [...]
> > >
> > > i'm curious, with what JVM was it tested and where's the source so i
> > > can fix their locking for them? Can the problem be reproduced with:
> >
> > Sure, but why shouldn't the compat behaviour be the default, and the
> > sysctl go away?
> >
> > It makes older JVMs work better, it is slightly closer to the old
> > behaviour, and it is arguably a less surprising result.
>
> as far as desktop apps such as firefox goes, the exact opposite is true.
> We had two choices basically: either a "more agressive" yield than
> before or a "less agressive" yield. Desktop apps were reported to hurt
> from a "more agressive" yield (firefox for example gets some pretty bad
> delays),
Why not to change source codes of firefox? If the sched_compat_yield=0,
the sys_sched_yield almost does nothing but returns, so firefox could just
do not call sched_yield. I assume 'sched_compat_yield=0' ~ no_call_to_sched_yield.
It's easier to delete calls to sched_yield in applications than to tune
calls to sched_yield.
> so we defaulted to the less agressive method. (and we defaulted
> to that in v2.6.23 already) Really, in this sense volanomark is another
> test like dbench - we care about it but not unconditionally and in this
> case it's a really silly API use that is at the center of the problem.
> Talking about the default alone will not bring us forward, but we can
> certainly add helpers to identify SCHED_OTHER::yield tasks - a once per
> bootup warning perhaps?
>
> Ingo
|  |