Re: Spinlocks, yet again: analysis and proposed patches

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Douglas McNaught <doug(at)mcnaught(dot)org>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Marko Kreen <marko(at)l-t(dot)ee>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Spinlocks, yet again: analysis and proposed patches
Date: 2005-09-13 17:11:12
Message-ID: 87zmqgzydr.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Douglas McNaught <doug(at)mcnaught(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Wong 2005-09-13 17:11:49 postgresql CVS callgraph data from dbt2
Previous Message Douglas McNaught 2005-09-13 16:24:04 Re: Spinlocks, yet again: analysis and proposed patches