Messages in this thread | | | From | Gerrit Huizenga <> | Subject | Re: must-fix list for 2.6.0 | Date | Wed, 30 Apr 2003 17:51:36 -0700 |
| |
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/
| |