Re: idle time & iowait accounting

From: Rik van Riel (riel@conectiva.com.br)
Date: Fri Nov 01 2002 - 22:44:47 EST


On Fri, 1 Nov 2002, Andrew Morton wrote:

> > + preempt_disable();
> > + rq = this_rq();
> > + atomic_inc(&rq->nr_iowait);
> > + schedule();
> > + atomic_dec(&rq->nr_iowait);
> > + preempt_enable();

> "scheduling while atomic".

Point.

> You'll need to reacquire the runqueue pointer on waking up.

No. It makes sense to decrement the same counter that was
incremented before.

regards,

Rik

-- 
Bravely reimplemented by the knights who say "NIH".
http://www.surriel.com/		http://distro.conectiva.com/
Current spamtrap:  <a href=mailto:"october@surriel.com">october@surriel.com</a>

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



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:23 EST