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

From: Vivek Goyal
Date: Tue Feb 15 2011 - 10:03:52 EST


On Tue, Feb 15, 2011 at 09:44:44AM +0800, Gui Jianfeng wrote:

[..]
> >> +static inline u64 cfq_get_boost(struct cfq_data *cfqd,
> >> + struct cfq_queue *cfqq)
> >> +{
> >> + u64 d;
> >> +
> >> + if (cfq_cfqq_sync(cfqq))
> >> + d = CFQ_BOOST_SYNC_BASE << CFQ_SERVICE_SHIFT;
> >> + else
> >> + d = CFQ_BOOST_ASYNC_BASE << CFQ_SERVICE_SHIFT;
> >> +
> >> + d = d * BLKIO_WEIGHT_DEFAULT;
> >> + do_div(d, cfqq->cfqe.weight);
> >> + return d;
> >> +}
> >
> > The logic for cfq_get_boost() looks a lot like cfq_scale_slice().
> > Instead of duplicating code, can't it just be
> > u64 d;
> > if (cfq_cfqq_sync(cfqq))
> > return cfq_scale_slice(CFQ_BOOST_SYNC_BASE, cfqq->cfqe);
> > else
> > return cfq_scale_slice(CFQ_BOOST_ASYNC_BASE, cfqq->cfqe);
> >

I still think that we should use smaller values for CFQ_BOOST_SYNC_BASE
because otherwise what it means is that for freshly backlogged queues
we assume that these have already used one slice and then requeue these
accordingly. Instead it should be reverse where freshly backlogged queues
should get preference over already queues which are hogging the disk
for long time.

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/