Re: [RFC V2 PATCH 1/5] cfq-iosched: adapt slice to number of processes doing I/O

From: Jeff Moyer
Date: Wed Oct 21 2009 - 12:37:02 EST


Corrado Zoccolo <czoccolo@xxxxxxxxx> writes:

>> Couldn't you have just divided the slice by iq? ÂAnd why iq? ÂWhy not
>> nr_qs or avg_qlen or something? ÂIt's a minor nit; I can live with it.
>
> iq stands for interested queues, because we are restricting the count
> just to the same priority class, not all queues in the system.

Ah, that makes sense. A comment would make that clear.

> I don't think this is equivalent. You seem to compute some divisions
> too early, losing in precision.

OK, I figured as much.

> slice * cfq_target_latency / (cfqd->cfq_slice[1] * iq)
> is not generally equivalent to:
> slice * (cfq_target_latency / (cfqd->cfq_slice[1] * iq))
> that is what you are computing.
> There is an other such case in your simplification.

OK. The idea was to try to make the thing a bit more digestable.
Honestly, I had to re-write it to figure out what it was doing. Could
you rework it so the logic is more obvious to others and still correct?

Thanks!
Jeff
--
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/