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


On Thu, 18 Mar 2004, Christoph Hellwig wrote:
>
> Like, umm, the long overdue sysconf()? For the time beeing a sysctl might
> be the easiest thing..

"sysconf" has not been "long-overdue". It's just that glibc hasn't (after
years of pleading) just fixed it.

sysconf() MUST NOT be done in kernel space. A lot of the sysconf() options
are pure user space stuff that the kernel has no idea about. Take a quick
look at some of those things, and realize that there are things like
"_SC_EXPR_NEST_MAX" etc that are _most_ of the values. And the kernel is
simply not involved in any of this.

So I will tell this one more time (and I bet I'll have to repeat myself
again in a year or two, and I bet I'll be ignored then too).

sysconf() is a user-level implementation issue, and so is something like
"number of CPU's". Damn, the simplest way to do it is as a environment
variable, for christ sake! Just make a magic environment variable called
__SC_ARRAY, and make it be some kind of binary encoding if you worry about
performance.

Or make a "/etc/sysconf/array" file, and just map it and look up the
values there.

Please don't raise this issue again.

Linus
-
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: 2009-11-18 23:46    [from the cache]
©2003-2011 Jasper Spaans