Re: sched_setaffinity usability
From: Paul Jackson
Date: Thu Mar 18 2004 - 19:13:38 EST
> Or make a "/etc/sysconf/array" file, and just map it and look up the
> values there.
On our [SGI's] Linux 2.4 kernel versions, we have a file called
/var/cpuset/cpu-node-map
that is built by an init script each boot, and lists each CPU, and the
corresponding Node number. Our user level library code reads that file
in as need be (caching the results of parsing it), and provides a
convenient way of asking how many CPUs, how many Memory Nodes, and on
which Node each CPU is located.
As we have worked our way through various hardware configuration
and devfs changes, the init script has changed how it pokes around
to obtain this information.
But the user level stuff that uses this file, via some library calls,
has not seen these problems - and enjoys having a convenient place from
which to obtain this information.
Our above choice of pathname for this file is a botch, but the idea
sounds like an instance of what Linus is suggesting.
The file is formatted with two whitespace separated ascii numbers per
line, a CPU number and the number of the associated Memory Node.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.650.933.1373
-
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/