Re: Spinlocks, yet again: analysis and proposed patches - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Spinlocks, yet again: analysis and proposed patches
Date
Msg-id 87zmqgzydr.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Spinlocks, yet again: analysis and proposed patches  (Douglas McNaught <doug@mcnaught.org>)
Responses Re: Spinlocks, yet again: analysis and proposed patches
List 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



pgsql-hackers by date:

Previous
From: Douglas McNaught
Date:
Subject: Re: Spinlocks, yet again: analysis and proposed patches
Next
From: Mark Wong
Date:
Subject: postgresql CVS callgraph data from dbt2