Re: [PATCH 3/8 v2] cfq-iosched: Introduce vdisktime and io weightfor CFQ queue

From: Vivek Goyal
Date: Mon Dec 13 2010 - 21:48:14 EST


On Tue, Dec 14, 2010 at 10:41:32AM +0800, Gui Jianfeng wrote:

[..]
> >> +
> >> + /*
> >> + * update the io weight if io priority gets changed.
> >> + */
> >> + cfqe->weight = cfq_prio_to_weight(cfqq->ioprio);
> >
> > How do you know that this cfqe/cfqq is not already on the service tree? I
> > don't think you can update weights while you are enqueued on the tree.
>
> Vivek, I'm not sure why we can't update weights if cfqe is enqueued on the tree.
> Do you mean when we update cfqe's weight we need to update tree's total_weight
> accordingly?

So far I can think of adjusting total_weight accordingly also if you are
updating the queue weight while it is on service tree.

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/