[parisc-linux] RfC: hpux-like sysconf variables in glibc, cpu affinity

Randolph Chung randolph@tausq.org
Wed, 24 Oct 2001 18:36:12 -0700


While helping to port the hpux PI performance monitoring stuff to Linux, I
came across several sysconf calls that appear to be supported by hpux
but not under Linux. Would like to get your opinions on how best to
support these:

variable:		sample output
===================================================================
_SC_CPU_VERSION		CPU_PA_RISC2_0
_SC_CPU_CHIP_TYPE	bitfield describing cpu type and rev
_SC_PSET_SUPPORT	1/0, see more below

there's also a call to confstr(_CS_MACHINE_MODEL) which is also not
supported by glibc.

>From what I can tell glibc implements the sysconf interface according to
what's in POSIX. I suppose some/all of these may not be posix.
So, what should we do to provide similar functionality? 

Option 1: implement these in glibc/syscalls... dunno what the glibc team
thinks

Option 2: provide a PI device-specific ioctl to get the info it needs
from the kernel

#1 seems like a better solution to me, what do you guys think?


The other part that is missing is the ability to bind a process to a
particular CPU in a SMP system (i.e. makes sure a process starts on CPU
n and stays on it). I did some digging into this and found that this is
basically not supported by Linux's SMP system. There were some pset
patches for 2.2.x and 2.3.x, but nothing that I could find for 2.4.x

Wonder if this is something that we can do, or if it's more of a
(potential) 2.5.x thing....

randolph
-- 
   @..@                                         http://www.TauSq.org/
  (----)
 ( >__< )
 ^^ ~~ ^^