lkml.org 
[lkml]   [2004]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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

/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@sgi.com> 1.650.933.1373
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:01    [from the cache]
©2003-2011 Jasper Spaans