lkml.org 
[lkml]   [2011]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/6 v4] cfq-iosched: Introduce vdisktime and io weight for CFQ queue
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


\
 
 \ /
  Last update: 2011-02-15 16:07    [W:0.081 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site