[lkml]   [2004]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: sched_setaffinity usability
> 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


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 <> 1.650.933.1373
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:01    [W:0.095 / U:0.324 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site