Re: [PATCH 1/3] block: Implement a blk_yield function to voluntarilygive up the I/O scheduler.

From: Vivek Goyal
Date: Fri Jun 25 2010 - 16:02:12 EST


On Fri, Jun 25, 2010 at 12:51:58PM -0400, Jeff Moyer wrote:
> Vivek Goyal <vgoyal@xxxxxxxxxx> writes:
>
> > On Tue, Jun 22, 2010 at 05:35:00PM -0400, Jeff Moyer wrote:
> >
> > [..]
> >> @@ -1614,6 +1620,15 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq,
> >> cfq_clear_cfqq_wait_request(cfqq);
> >> cfq_clear_cfqq_wait_busy(cfqq);
> >>
> >> + if (!cfq_cfqq_yield(cfqq)) {
> >> + struct cfq_rb_root *st;
> >> + st = service_tree_for(cfqq->cfqg,
> >> + cfqq_prio(cfqq), cfqq_type(cfqq));
> >> + st->last_expiry = jiffies;
> >> + st->last_pid = cfqq->pid;
> >> + }
> >> + cfq_clear_cfqq_yield(cfqq);
> >
> > Jeff, I think cfqq is still on service tree at this point of time. If yes,
> > then we can simply use cfqq->service_tree, instead of calling
> > service_tree_for().
>
> Yup.
>
> > No clearing of cfqq->yield_to field?
>
> Nope. Again, it's not required, but if you really want me to, I'll add
> it.

I think clearing up is better as it leaves no scope for confusion.

Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/