lkml.org 
[lkml]   [2003]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] io stalls
On Wed, Jun 11, 2003 at 10:48:23AM +1000, Nick Piggin wrote:
>
>
> Andrea Arcangeli wrote:
>
> >On Mon, Jun 09, 2003 at 05:39:23PM -0400, Chris Mason wrote:
> >
> >>+ if (!waitqueue_active(&q->wait_for_requests[rw]))
> >>+ clear_queue_full(q, rw);
> >>
> >
> >you've an smp race above, the smp safe implementation is this:
> >
> > if (!waitqueue_active(&q->wait_for_requests[rw])) {
> > clear_queue_full(q, rw);
> > mb();
> > if (unlikely(waitqueue_active(&q->wait_for_requests[rw])))
> > wake_up(&q->wait_for_requests[rw]);
> > }
> >
> >I'm also unsure what the "waited" logic does, it doesn't seem necessary.
> >
>
> When a task is woken up, it is quite likely that the
> queue is still marked full.

but we don't care if it's marked full, see __get_request. If we cared
about full it would deadlock anyways (no matter the waited logic)

Andrea
-
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: 2005-03-22 13:36    [W:0.075 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site