Thread (5 messages) flat view 5 messages, 3 authors, 2007-01-12

Re: [PATCH/RFC 2.6.21 3/5] ehca: completion queue: remove use of do_mmap()

From: Christoph Hellwig <hch@infradead.org>
Date: 2007-01-11 19:43:57
Also in: lkml

On Thu, Jan 11, 2007 at 01:40:54PM -0600, Nathan Lynch wrote:
Christoph Hellwig wrote:
quoted
On Thu, Jan 11, 2007 at 08:08:36PM +0100, Hoang-Nam Nguyen wrote:
quoted
 	spin_lock_irqsave(&ehca_cq_idr_lock, flags);
 	while (my_cq->nr_callbacks)
 		yield();
Calling yield is a very bad idea in general.  You should probably
add a waitqueue that gets woken when nr_callbacks reaches zero to
sleep effectively here.
Isn't that code outright buggy?  Calling into the scheduler with a
spinlock held and local interrupts disabled...
Umm, yes - of course.  I missed the spin_lock_irqsave line just above.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help