xfs
[Top] [All Lists]

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

To: Luben Tuikov <luben@xxxxxxxxxxxx>
Subject: Re: PATCH: sleeping while holding a lock in _pagebuf_free_bh()::page_buf.c
From: Andi Kleen <ak@xxxxxxx>
Date: Wed, 23 Oct 2002 05:17:13 +0200
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, linux-xfs <linux-xfs@xxxxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxx>
In-reply-to: <3DB5CC26.D5F4BB84@xxxxxxxxxxxx>
References: <3DB49424.9E4CAC0F@xxxxxxxxxxxx> <20021022213140.A11191@xxxxxxxxxxxxx> <3DB5CC26.D5F4BB84@xxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.22.1i
> 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.

-Andi
>  


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