Re: lwlocks and starvation

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: lwlocks and starvation
Date: 2004-11-25 06:04:16
Message-ID: 1101362656.12045.74.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2004-11-24 at 23:30 -0500, Tom Lane wrote:
> It is not a 100% solution because it does not
> cover the case where a waiting exclusive locker is released, then a new
> shared locker arrives at the lock before the exclusive locker is given
> any cycles to acquire the lock. However I don't see any cure for the
> latter problem that's not worse than the disease

Yeah, I don't think this is a problem -- eventually the exclusive waiter
will win the coin flip anyway.

> On the other hand we might consider that this isn't a big problem and
> just leave things as they are. We haven't seen any indication that
> starvation is a real problem in practice, and so it might be better to
> avoid extra trips through the kernel scheduler.

Yes, I'm a little concerned about applying a patch to address what is,
so far, an entirely academic concern -- especially if it might hurt
performance.

-Neil

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ElayaRaja S 2004-11-25 06:41:08 Help!
Previous Message Sean Chittenden 2004-11-25 04:53:11 Re: Stack not being popped correctly (was: Re: [HACKERS] plpgsql lacks generic identifier for record in triggers...)