[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110215142149.GA27296@redhat.com>
Date: Tue, 15 Feb 2011 09:21:50 -0500
From: Vivek Goyal <vgoyal@...hat.com>
To: Gui Jianfeng <guijianfeng@...fujitsu.com>
Cc: Justin TerAvest <teravest@...gle.com>,
Jens Axboe <axboe@...nel.dk>,
Shaohua Li <shaohua.li@...el.com>,
lkml <linux-kernel@...r.kernel.org>,
Chad Talbott <ctalbott@...gle.com>,
Divyesh Shah <dpshah@...gle.com>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists