Re: must-fix list for 2.6.0

Gerrit Huizenga
2003-05-01T00:40:15Z

On 30 Apr 2003 20:09:13 EDT, Robert Love wrote:
> On Wed, 2003-04-30 at 19:47, viro@parcelfarce.linux.theplanet.co.uk
> wrote:
>
> > Excuse me, but WTF do they spin on the sched_yield() in the first place?
> > _That_ sounds like utterly broken...
>
> I agree it is broken, but it was considered a method of implementing
> user-space locking for a long time..
>
> The problem is in LinuxThreads mostly, I guess, according to Andrew.

Which affects JVM in most cases. NPTL based JVMs will possibly
obviate that problem. My guess is that in the JVM case, they have
a bad locking model (er, a simpler 2-tier locking model instead of
a more correct and complex 3-tier locking model) for their threading
operations. As a result, they use either sched_yield() or used
to use pause() to relinquish the processor so the world could change
and they could acquire the locks they wanted.

Sounds stupid, but that was the most obvious linuxthreads implementation.
Futexes are also likely to help here, btw...

Of course, all of this is my own heresay, so if anyone has better
details, feel free to add them.

gerrit