Re: [RFC][PATCH] iowait statistics

Rik van Riel (riel@conectiva.com.br)
Tue, 14 May 2002 09:30:12 -0300 (BRT)


On Mon, 13 May 2002, Andrew Morton wrote:

> > ===== fs/buffer.c 1.64 vs edited =====
> > --- 1.64/fs/buffer.c Mon May 13 19:04:59 2002
> > +++ edited/fs/buffer.c Mon May 13 19:16:57 2002
> > @@ -156,8 +156,10 @@
> > get_bh(bh);
> > add_wait_queue(&bh->b_wait, &wait);
> > do {
> > + atomic_inc(&nr_iowait_tasks);
> > run_task_queue(&tq_disk);
> > set_task_state(tsk, TASK_UNINTERRUPTIBLE);
> > + atomic_dec(&nr_iowait_tasks);
> > if (!buffer_locked(bh))
> > break;
> > schedule();
>
> Shouldn't the atomic_inc cover the schedule()?

DOH, indeed. Placed in the wrong place ;/

Rik

-- 
Bravely reimplemented by the knights who say "NIH".

http://www.surriel.com/ http://distro.conectiva.com/

- 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/