Re: [PATCH 0/1] Correct sorting problem in cfq_service_tree_add

From: Alan D. Brunelle
Date: Tue Nov 24 2009 - 09:50:00 EST


On Tue, 2009-11-24 at 15:03 +0100, Corrado Zoccolo wrote:
> On Tue, Nov 24, 2009 at 2:11 PM, Alan D. Brunelle <Alan.Brunelle@xxxxxx> wrote:
> > Found this whilst reviewing the CFQ I/O scheduler code: Currently, this
> > routine only sorts using the I/O priority class - it does not properly
> > sort prioritized queues within a specific class. The patch changes the
> > sort to utilize the full I/O priority (class & priority).
>
> This changes mixes the interpretation of classes and levels within class.
> In the original code, those different things have different meanings:
> * priority class decides who can use the disk
> * priority level within a class determines how much of the disk time
> each queue will obtain
> In your case. instead, you completely remove the second meaning, and
> provide a larger number of levels to just decide the first.

Having read the ioprio.txt I had thought that the priorities within a
class should still be honored and that the time slice calculations in
cfq_prio_slice would be left as is. "ioprio" is probably the wrong field
name in the code (and text) then, as it is not meant as a priority but
as a time slice indicator?! The text in ioprio.txt and in the man page
for ionice are very inconsistent here: For example, the ionice man page
states: "This [best effort] class takes a priority argument from 0-7,
with lower number being higher priority. Programs running at the same
best effort priority are served in a round-robin fashion." Which implies
a secondary sort-order for priority within a class. Of course, both
ioprio.txt and the ionice man page also talk about class levels in a way
that may indicate it is not priority based. Hm...

Regards,
Alan

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