lkml.org 
[lkml]   [2003]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: must-fix list for 2.6.0
Date
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.945 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site