Re: [PATCH] Time sliced CFQ #2

From: Kyle Moffett
Date: Mon Dec 06 2004 - 00:02:19 EST


On Dec 05, 2004, at 21:34, Con Kolivas wrote:
I think when nice is changed, ioprio needs to be changed with it as a sane
default action. I suspect that most of the time people will not use the
separate ioprio call, but using 'nice' is a regular linuxy thing to do. Ideally
we make ioprio part of the 'nice' utility and we specify both at the same time.
Something like: "nice -n 5 -i 20 blah"

What about this:

nice = x; /* -20 to 20 */
ioprio = y; /* -40 to 40 */
effective_ioprio = clamp(x+y); /* -20 to 20 */

This would allow tuning processes for unusual contrasts with the ioprio call.
On the other hand, it would allow us to just brute force "adjust" a process with
the nice command in the usual way without any changes to the "nice" source.

I also thought of a different effective ioprio calculation that scales
instead of clamping:

nice = x; /* -20 to 20 */
ioprio = y; /* -20 to 20 */
effective_ioprio = ((ioprio<0)?(20+nice):(20-nice)) * abs(ioprio)/20;
/* -20 to 20 */

Cheers,
Kyle Moffett

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a18 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r !y?(-)
------END GEEK CODE BLOCK------


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