xfs
[Top] [All Lists]

Re: PATCH: sleeping while holding a lock in _pagebuf_free_bh()::page_buf

To: Andi Kleen <ak@xxxxxxx>
Subject: Re: PATCH: sleeping while holding a lock in _pagebuf_free_bh()::page_buf.c
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 23 Oct 2002 15:52:20 +0100
Cc: Luben Tuikov <luben@xxxxxxxxxxxx>, linux-xfs <linux-xfs@xxxxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxx>
In-reply-to: <20021023051713.B17128@xxxxxxxxxxxxx>; from ak@xxxxxxx on Wed, Oct 23, 2002 at 05:17:13AM +0200
References: <3DB49424.9E4CAC0F@xxxxxxxxxxxx> <20021022213140.A11191@xxxxxxxxxxxxx> <3DB5CC26.D5F4BB84@xxxxxxxxxxxx> <20021023051713.B17128@xxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5.1i
On Wed, Oct 23, 2002 at 05:17:13AM +0200, Andi Kleen wrote:
> > BTW, what is the purpose of wake_up_sync()?
> 
> wake_up_sync() only wakes up the first process/thread waiting on the
> wait queue. Not all. This is to avoid the 'thundering herd' lock performance
> problem with many waiters when lots of processes get woken up all the time 
> just to discover that there is no work for them yet and go to sleep again.
> But it needs careful auditing of the code if it can really tolerate 
> wake one.

wake_up_sync() is exactly like wake_up() - just that it will never
reschedule to woken up thread.  Both wake_up() and wake_up_sync() never
sleep and wake up just the firt process.


> 
> -Andi
> >  
---end quoted text---


<Prev in Thread] Current Thread [Next in Thread>