Re: a nohup-like interface to cpu affinity

Linux maillist account (l-k@mindspring.com)
Tue, 27 Nov 2001 01:32:19 -0500


At 11:49 PM 11/26/01 -0500, Robert Love wrote:
>I can see the use for this, but you can also just do `echo whatever >
>/proc/123/affinity' once it is running ... not a big deal.

It's isn't quite the same..the biggest difference is races. The cpuselect(1)
tool would change the affinity mask before the fork & exec of the first
child. To
do this by hand via an `echo whatever >/proc/123/affinity' would miss all the
children spun off by 123 before the echo could be executed. One could write
cpuselect as a shell script I suppose, using within it an echo on
/proc/self/affinity,
though even as a shell script it would be better to have this tool be part
of the standard
Linux repetoire that everyone could depend upon as being there in all Linux
distributions
and having a well known and unchanging syntax and semantics, rather than
have it
remain something that each user creates ad-hoc as the need for the tool arises.

Joe

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