[HOWTO] Emulate processor sets (pset) for linux kernel 2.5/2.6

From: \\\ (srhaque@iee.org)
Date: Tue Jul 15 2003 - 06:39:56 EST


A while ago, I was banging on about kernel patches and whatnot to implement the
equivalent of "pset" functionality. After some shoves/pointers from Robert and
Miquel, I found that init(8) has the concept of an initscript(5), so that the
trivial solution to my problem is to say:

#
# initscript Executed by init(8) for every program it
# wants to spawn like this:
#
# /bin/sh /etc/initscript <id> <level> <action> <process>
#
taskset -p 1 $$
eval exec "$4"

and then modify the relevant programs to set their affinity to the other
processors as required. Bingo!

Hope this helps, Shaheed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 15 2003 - 22:00:56 EST