[Devel] Re: IO scheduler based IO controller V10
Mike Galbraith
efault at gmx.de
Fri Oct 2 05:22:16 PDT 2009
On Fri, 2009-10-02 at 11:55 +0200, Jens Axboe wrote:
> On Fri, Oct 02 2009, Mike Galbraith wrote:
> >
> > /*
> > * Drain async requests before we start sync IO
> > */
> > if (cfq_cfqq_idle_window(cfqq) && cfqd->rq_in_driver[BLK_RW_ASYNC])
> >
> > Looked about the same to me as..
> >
> > enable_idle = old_idle = cfq_cfqq_idle_window(cfqq);
> >
> > ..where Vivek prevented turning 1 into 0, so I stamped it ;-)
>
> cfq_cfqq_idle_window(cfqq) just tells you whether this queue may enter
> idling, not that it is currently idling. The actual idling happens from
> cfq_completed_request(), here:
>
> else if (cfqq_empty && !cfq_close_cooperator(cfqd, cfqq, 1) &&
> sync && !rq_noidle(rq))
> cfq_arm_slice_timer(cfqd);
>
> and after that the queue will be marked as waiting, so
> cfq_cfqq_wait_request(cfqq) is a better indication of whether we are
> currently waiting for a request (idling) or not.
Hm. Then cfq_cfqq_idle_window(cfqq) actually suits my intent better.
(If I want to reduce async's advantage, I should target specifically, ie
only stamp if this queue is a sync queue....otoh, if this queue is sync,
it is now officially too late, whereas if this queue is dd about to
inflict the wrath of kjournald on my reader's world, stamping now is a
really good idea.. scritch scritch scritch <smoke>)
I'll go tinker with it. Thanks for the clue.
-Mike
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list