Re: [RFC] cfq: adapt slice to number of processes doing I/O (v2)

From: Jens Axboe
Date: Tue Sep 15 2009 - 15:19:41 EST


On Tue, Sep 15 2009, Corrado Zoccolo wrote:
> [This applies on top of git://git.kernel.dk/linux-2.6-block.git for-2.6.32]
>
> When the number of processes performing I/O concurrently increases,
> a fixed time slice per process will cause large latencies.
>
> This (v2) patch will scale the time slice assigned to each process,
> according to a target latency (tunable from sysfs, default 300ms).

OK, I'm ready to take this patch in for some testing. But please run it
through checkpatch, you have reeeally long lines. And shorten some of
your variable names while at it.

> @@ -1092,7 +1130,7 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd)
> * fair distribution of slice time for a process doing back-to-back
> * seeks. so allow a little bit of time for him to submit a new rq
> */
> - sl = cfqd->cfq_slice_idle;
> + sl = min(cfqd->cfq_slice_idle, (unsigned)(cfqq->slice_end - jiffies));

min_t() ?

--
Jens Axboe

--
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/