lkml.org 
[lkml]   [2007]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH/RFC 2.6.21 3/5] ehca: completion queue: remove use of do_mmap()
On Thu, Jan 11, 2007 at 01:40:54PM -0600, Nathan Lynch wrote:
> Christoph Hellwig wrote:
> > On Thu, Jan 11, 2007 at 08:08:36PM +0100, Hoang-Nam Nguyen wrote:
> >
> > > 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-01-11 21:37    [W:0.162 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site