Re: [PATCH 2/3]CFQ: add think time check for service tree

From: Vivek Goyal
Date: Wed Jul 06 2011 - 11:01:50 EST


On Wed, Jul 06, 2011 at 09:57:45AM +0800, Shaohua Li wrote:
[..]
> [test1]
> rw=randread
> ioengine=libaio
> size=500m
> directory=/mnt
> filename=file1
> thinktime=9000
>
> [test2]
> rw=read
> ioengine=libaio
> size=1G
> directory=/mnt
> filename=file2
>
> patched base
> test1 41k/s 33k/s
> test2 15868k/s 15789k/s
> total 15902k/s 15817k/s

Because we are not idling, throughput of randread workload has gone down.
Can you make sure it does not go down in case of launching firefox in
the presence of buffered writers. I want to make sure we got thinktime
logic right and we don't end up not idling even when thinktimes are
low.

[..]
> static void
> @@ -3570,7 +3587,13 @@ static void cfq_completed_request(struct
> cfqd->rq_in_flight[cfq_cfqq_sync(cfqq)]--;
>
> if (sync) {
> + struct cfq_rb_root *service_tree;
> +
> RQ_CIC(rq)->ttime.last_end_request = now;
> +
> + service_tree = service_tree_for(cfqq->cfqg, cfqq_prio(cfqq),
> + cfqq_type(cfqq));

I think we could do.

if (cfq_cfqq_on_rr(cfqq)
service_tree = cfqq->service_tree;
else
service_tree = service_tree_for();

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/