Re: Spinlocks, yet again: analysis and proposed patches
Greg Stark <gsstark@mit.edu>
From: Greg Stark <gsstark@mit.edu>
To: Douglas McNaught <doug@mcnaught.org>
Cc: Greg Stark <gsstark@mit.edu>, Tom Lane <tgl@sss.pgh.pa.us>, Marko Kreen <marko@l-t.ee>, pgsql-hackers@postgresql.org
Date: 2005-09-13T17:11:12Z
Lists: pgsql-hackers
Douglas McNaught <doug@mcnaught.org> writes: > > It seems to me what you've found is an outright bug in the linux scheduler. > > Perhaps posting it to linux-kernel would be worthwhile. > > People have complained on l-k several times about the 2.6 > sched_yield() behavior; the response has basically been "if you rely > on any particular sched_yield() behavior for synchronization, your app > is broken--it's not a synchronization primitive." They're not talking about this. They're talking about applications that spin on sched_yield() and expect it to reduce cpu load as if the process were calling sleep(). What Tom found was that some processes are never scheduled when sched_yield is called. There's no reason that should be happening. -- greg