Linux-Development-Sys Digest #780, Volume #8     Sun, 10 Jun 01 02:13:07 EDT

Contents:
  Re: Type iso_t ("Norm Dresner")
  test news ([EMAIL PROTECTED])
  cprof source (Kamala Prasad Kakulavarapu)
  Re: how can I get a change to "official" linux? (found something new) (Eric Taylor)
  Hey Viro (cLIeNUX user)
  Re: winmodem source file can be modified ? (Jim Bean)
  Request for comment - notion for cpuset option in umask. (Paul Jackson)

----------------------------------------------------------------------------

From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Re: Type iso_t
Date: Sat, 09 Jun 2001 18:20:11 GMT

Marcel Baur <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> I for myself wrote:
>
> > Does anyone know how and where type  iso_t  is defined?
> > I found references in sys/types.h but didn't get very far.
> > sizeof(iso_t) gives me a size of 4 bytes, but I can't believe
> > iso_t is simply an int.
>
> s / iso_t / ino_t
>
> Sorry for the mess.
>


    grep     ino_t      /usr/include/*.h

shows that ino_t is typedef'd in dirent.h

    Norm




------------------------------

From: [EMAIL PROTECTED]
Subject: test news
Date: Sat, 9 Jun 2001 18:02:10 +0000 (UTC)

test news
--
Gloria
http://www.orravan.com

------------------------------

From: Kamala Prasad Kakulavarapu <[EMAIL PROTECTED]>
Subject: cprof source
Date: Sat, 9 Jun 2001 17:38:45 -0400


Hello,

I am looking for cprof source; the Corel's URL seems to be
down;http://opensource.corel.com/sourcecode_cvs.html

Can someone point me to where I can acces cprof source?

Thanks,
Prasad


------------------------------

From: Eric Taylor <[EMAIL PROTECTED]>
Subject: Re: how can I get a change to "official" linux? (found something new)
Date: Sun, 10 Jun 2001 00:02:12 GMT



John Reiser wrote:

> > > Have you considered making the base address part of ulimit()?
> > > This would protect other processes from interference, yet provide
> > > an inheritable paramter for selected process trees.
> >
> > I don't understand this, could you explain a bit what you mean
> > and how this might accomplish the desired goal?
>
> Look at "man setrlimit" and /usr/include/bits/resource.h .
> There are several parameters that can be set on a per-process basis.
> Also, a child process inherits its initial values from its parent.
> Things like the maximum sizes of data, stack, core files, etc.
> (RLIMIT_DATA, RLIMIT_STACK, RLIMIT_CORE).  Setting RLIMIT_CORE to 0
> is a way to prevent memory dumps in response to SIGSEGV, for instance.
>
> You could add RLIMIT_MMAPBASE to specify the base address
> to be used as the starting point for the search for enough room
> when calling mmap(0, ...) with MAP_FIXED not set.  Setting
> RLIMIT_MMAPBASE would affect subsequent mmap() in the current
> process, and all calls from child processes, until reset.
>
> If you made the shell 'ulimit' command aware of RLIMIT_MMAPBASE,
> just like the shell knows about RLIMIT_CORE, then you could set
> the base address for all children of a shell.  You could also
> write a helper program
>     mmapbase 0xa0000000 myprog arg1 arg2 arg3
> which would perform the setrlimit, then execve() "myprog arg1 ...".
>
> > [snipped]
>

That would indeed be a far cleaner and elegant solution.

Unfortunately, it is beyond my abilities, and like other posters have
mentioned, it might take years to get this into the official release.

Also, if I understand this, one would have to set the value, and THEN
create the new process (i.e. the values would take affect on the
next process created that had these limits - it can't really move
any that are currently in memory [of the shell for ex])

Also, I gather that the bash shell should eventually need support
for this, although as you mention, one could provide a mini-shell.

And, since my goal was to not have to build my own kernel,
I would still have to do a custom build, at least for now.


thanks all
eric
======================================================
p.s. I do have an even more hackish way to do this:
I include it here for others that might want to play
around with this, enjoy:

1. use gdb on vmlinux and /proc/kcore to disassemble
get_unmapped_area
2. find the instruction that moves (usually 0x40000000)
into register eax (see below)
3. dump this code in hex bytes
4. use the "kern" program I include below to modify
system memory
5. don't try this on a critical system :-) or at least use
the test option (w) first



(run gdb on live system)
[1044]$ gdb /usr/src/linux-2.4.1/vmlinux /proc/kcore

GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...(no debugging symbols found)...
Core was generated by `auto BOOT_IMAGE=k24 ro root=80b BOOT_FILE=/boot/kern24'.
#0  0x0 in ?? ()

(gdb) disassemble get_unmapped_area
Dump of assembler code for function get_unmapped_area:
0xc0124140 <get_unmapped_area>: push   %esi
0xc0124141 <get_unmapped_area+1>:       push   %ebx
0xc0124142 <get_unmapped_area+2>:       mov    0x10(%esp,1),%esi
0xc0124146 <get_unmapped_area+6>:       mov    0xc(%esp,1),%ebx
0xc012414a <get_unmapped_area+10>:      cmp    $0xc0000000,%esi
0xc0124150 <get_unmapped_area+16>:      jbe    0xc0124156 <get_unmapped_area+22>
0xc0124152 <get_unmapped_area+18>:      xor    %eax,%eax
0xc0124154 <get_unmapped_area+20>:      jmp    0xc01241b2 <get_unmapped_area+114>
0xc0124156 <get_unmapped_area+22>:      test   %ebx,%ebx

(note this address)

0xc0124158 <get_unmapped_area+24>:      mov    $0x40000000,%eax

0xc012415d <get_unmapped_area+29>:      cmove  %eax,%ebx
0xc0124160 <get_unmapped_area+32>:      mov    $0xffffe000,%eax
0xc0124165 <get_unmapped_area+37>:      and    %esp,%eax
0xc0124167 <get_unmapped_area+39>:      add    $0xfff,%ebx
0xc012416d <get_unmapped_area+45>:      and    $0xfffff000,%ebx
0xc0124173 <get_unmapped_area+51>:      push   %ebx
0xc0124174 <get_unmapped_area+52>:      mov    0x2c(%eax),%eax
0xc0124177 <get_unmapped_area+55>:      push   %eax
0xc0124178 <get_unmapped_area+56>:      call   0xc01243e0 <find_vma>


(gdb) x/50bx get_unmapped_area
0xc0124140 <get_unmapped_area>: 0x56    0x53    0x8b    0x74    0x24    0x10    0x8b   
 0x5c
0xc0124148 <get_unmapped_area+8>:       0x24    0x0c    0x81    0xfe    0x00    0x00   
 0x00    0xc0
0xc0124150 <get_unmapped_area+16>:      0x76    0x04    0x31    0xc0    0xeb    0x5c   
 0x85    0xdb

(note these bytes)
0xc0124158 <get_unmapped_area+24>:      0xb8    0x00    0x00    0x00    0x40    0x0f   
 0x44    0xd8

0xc0124160 <get_unmapped_area+32>:      0xb8    0x00    0xe0    0xff    0xff    0x21   
 0xe0    0x81
0xc0124168 <get_unmapped_area+40>:      0xc3    0xff    0x0f    0x00    0x00    0x81   
 0xe3    0x00
0xc0124170 <get_unmapped_area+48>:      0xf0    0xff


Using the program (see below) called kern, and the below
command line, one can patch kernel code at runtime. The last
part of this is the *=b0 which changes a byte that makes
libraries load at b0 00 00 00 instead of 40 00 00 00

the values after the address are bytes to verify and/or change.
The W means do it, where a w (lower case) means just tell me
what you are about to do.

(x=y means if this value is x, change it to y)
(*=y means dont' try to verify it, just change it)
(x=x means verify x is there, and change to x -i.e. don't change it, but verify it)
(the b after the W means do bytes, other values like w etc. not implemented,
but the b must be present)

If any verifys fail, then the changes are not made and the program quits.

The program also has some other options, not of use here. (One was
an attempt to try to locate the code automatically)

[1054]$ ./kern

usage: kern   Ww  b/w/l file start bytes/wds/lgs...  -- write (w=test, W=doit)


Example to modify the 40 to b0 moving library loads to b0 00 00 00

[1077]$ ./kern W b /dev/kmem c0124158 b8=b8 00=00 00=00 00=00  *=b0

write 5 b's from /dev/kmem starting at c0124158/c0124158
file opened ok 3
 0) c0124158:  -72. b8 (rstat=1)       b8 ->       b8   changed: b8 (wstat=1)
 1) c0124159:    0. 00 (rstat=1)        0 ->        0   changed: 0 (wstat=1)
 2) c012415a:    0. 00 (rstat=1)        0 ->        0   changed: 0 (wstat=1)
 3) c012415b:    0. 00 (rstat=1)        0 ->        0   changed: 0 (wstat=1)
 4) c012415c:   64. 40 (rstat=1) ffffffff ->       b0   changed: b0 (wstat=1)




========== kern.c =============
(compiles: gcc -o kern kern.c)
(must be su to run)


#include <time.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>

#ifdef WIN32
#include <io.h>
#endif

#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
char * timeis() {
 struct tm *newtime;
 static char buf[100];
 time_t aclock;
    time( &aclock );                 /* Get time in seconds */
    newtime = localtime( &aclock );  /* Convert time to struct */
 strcpy(buf,(char *)asctime( newtime )+11);
 buf[strlen(buf)-1-4] = '\0';
 return buf;
}
int hex(char *in,int n) {
 int v; char *p;
 if(n==1) {
  if (in[0] == '*') {
   v = -1;
  } else {
   sscanf(in,"%x",&v);
  }
 } else {
  p = strchr(in,'=');
  if (p) {
   if (p[1] == '*') {
    v = -1;
   } else {
    sscanf(p+1,"%x",&v);
   }
  } else {
   v = -1;
  }
 }
 return v;
}
int val(char *in) {
 int v;
 if (in[0] == '0' &&  ( (in[1] == 'x')  ||  (in[1] == 'X') )  ) {
  v = hex(&in[2],1);
 } else if (in[0] == '0'  ) {
  v = hex(&in[0],1);
 } else {
  v = atoi(in);
 }
 return v;
}
int getbyte(int io, int start) {
 int stat; char buf[2];
 stat = 0;
 stat =  lseek (io,  start, SEEK_SET );
 if (stat == -1) {
  fprintf(stderr,"error seeking %s\n",strerror(errno));
  return -1;
 } else {
  //fprintf(stderr,"seek stat returns %x\n",stat);
 }
 stat = read(io,buf,1);
 if (stat <= 0) {
  fprintf(stderr,"error reading (%d) %s\n",stat,strerror(errno));
  return -1;
 }
 return buf[0] & 0xff;
}

#ifdef WIN32
#define open _open
#define lseek _lseek
#undef O_RDONLY
#define O_RDONLY _O_RDONLY | _O_BINARY
#endif

main(int argc, char **argv) {int r=0; int i; long io; char buf[50]; int stat; int n; 
char *f;
 unsigned int start;

 if (argc <= 2) {
out:
  fprintf(stderr,"\n");
  //                        0   1    2     3    4    5...
  fprintf(stderr,"usage: kern   r   b/w/l file start n ...             -- read n 
items\n");
  fprintf(stderr,"usage: kern   Ww  b/w/l file start bytes/wds/lgs...  -- write 
(w=test, W=doit)\n");
  fprintf(stderr,"usage: kern   f/F b/w/l file start bytes/wds/lgs...  -- find 
f=dec,F=hex out\n");
  fprintf(stderr,"usage: kern   d/x val ...  (output d=dec,x=hex)      -- add 
values\n");
  r = 0;
  return r;
 }
 start = 0;
 if (argc > 4) {
  start = hex(argv[4],1);
 }
 f = 0;
 if (argc > 3) {
  f  = argv[3];
 }
 if (argv[1][0] == 'd' || argv[1][0] == 'x') { int sum = 0;

  for(i = 2 ; i <  argc ; i++ ) {
   sum = sum + val(argv[i]);
  }
  if (argv[1][0] == 'd') {
   printf("%d\n",sum);
  } else {
   printf("%x\n",sum);
  }
  return 0;
 } else if (argv[1][0] == 'r') {
  n  = atoi(argv[5]);
  fprintf(stderr,"read %d %s's from %s starting at 
%s/%x\n",n,argv[2],argv[3],argv[4],start);
  //r= main1(argc-1,&argv[1]);
  io = open (argv[3], O_RDONLY);
  if (!io) {
   fprintf(stderr,"cannot open file\n");
   return 0;
  } else {
   fprintf(stderr,"file opened ok %d\n",io);
  }


  if (argv[2][0] == 'b') {
   for(i = 0 ; i <  n ; i++ ) {
    stat = 0;
    if(start+1 != 0)stat =  lseek (io,  start+i, SEEK_SET );
    if (stat == -1) {
     fprintf(stderr,"error seeking %s \n",strerror(errno));
     return 0;
    } else {
     //fprintf(stderr,"seek stat returns %x\n",stat);
    }
    stat = read(io,buf,1);
    if (stat <= 0) {
     fprintf(stderr,"error reading (%d) %s \n",stat,strerror(errno));
     return 0;
    }
    printf("%2d) %08x: %14d.   %02x   stat=%d\n",i,i+start,buf[0],buf[0]&0xff,stat);
   }
  } else if (argv[2][0] == 'w') {
  } else if (argv[2][0] == 'l') {
  } else {
  }
 } else if (argv[1][0] == 'f' || argv[1][0] == 'F' ) { unsigned int bytes[1000];
  n = argc - 5;
  fprintf(stderr,"find %d %s's from %s starting at 
%s/%x\n",n,argv[2],argv[3],argv[4],start);
  //r= main1(argc-1,&argv[1]);
  io = open (argv[3], O_RDONLY);
  if (!io) {
   fprintf(stderr,"cannot open file\n");
   return 0;
  } else {
   fprintf(stderr,"file opened ok %d\n",io);
  }
  for(i = 0 ; i <  n ; i++ ) {
   bytes[i] = hex(argv[i+5],1);
  }

  if (argv[2][0] == 'b') {int j,l,b;
   for(j = 0 ; j <  1000000 ; j++ ) {
    l=1;
    for(i = 0 ; i <  n ; i++ ) {
     b = getbyte(io,start+j+i);
     if (b != bytes[i] &&bytes[i] != 0xffffffff ) {
      l = 0;
      break; // no match, slide up
     }
    }
    if (l == 1) {
     start = start + j;
     break; // done, match
    }
   }
   if (l == 1) {
    fprintf(stderr,"match at %d %x\n",start,start);
    if (argv[1][0] == 'F' ) {
     printf("%d\n",start);
    } else {
     printf("%x\n",start);
    }
    // done match
   } else {
    printf("%d\n",0);

    fprintf(stderr,"no match\n");
    // done no match
   }
   return 0;
  } else if (argv[2][0] == 'w') {
  } else if (argv[2][0] == 'l') {
  } else {
  }
 } else if (argv[1][0] == 'w' || argv[1][0] == 'W') {
  //r =main0(argc-1,&argv[1]);
  n = argc - 5;
  fprintf(stderr,"write %d %s's from %s starting at 
%s/%x\n",n,argv[2],argv[3],argv[4],start);
  //r= main1(argc-1,&argv[1]);
  io = open (argv[3], O_RDWR);
  if (io == -1) {
   fprintf(stderr,"cannot open file %s for write\n",argv[3]);
   return 0;
  } else {
   fprintf(stderr,"file opened ok %d\n",io);
  }


  if (argv[2][0] == 'b') {
   for(i = 0 ; i <  n ; i++ ) { int fr,to;
    stat = 0;
    if(start+1 != 0)stat =  lseek (io,  start+i, SEEK_SET );
    if (stat == -1) {
     fprintf(stderr,"error seeking %s\n",strerror(errno));
     return 0;
    } else {
     //fprintf(stderr,"seek stat returns %x\n",stat);
    }
    stat = read(io,buf,1);
    if (stat <= 0) {
     fprintf(stderr,"error reading (%d) %s \n",stat,strerror(errno));
     return 0;
    }

    printf("%2d) %08x: %4d. %02x (rstat=%d) %8x -> %8x   "
    ,i,i+start,buf[0],buf[0]&0xff,stat,fr=hex(argv[i+5],1),to=hex(argv[i+5],2));

    if(start+1 != 0)stat =  lseek (io,  start+i, SEEK_SET );
    if (stat == -1) {
     fprintf(stderr,"error seeking %s - ",strerror(errno));
     return 0;
    } else {
     //fprintf(stderr,"seek stat returns %x\n",stat);
    }
    //
    // fr=to (check fr)
    // fr=* or fr (check fr, don't change
    // *=to don't check, just set
    //
    if (to == -1 && fr == -1) {   // * or *=* means don't change, don't check
     printf("no check or change\n");
    } else if ( (fr != -1 ) &&  ((buf[0]&0xff) != (fr&0xff))  ) {
     printf("quit: current (%x) is not %x\n",buf[0]&0xff,fr&0xff);
     return 0;
    } else if(argv[1][0] == 'w') {
     printf("would change: %x\n",to);
    } else {
     buf[0] = to;
     stat = write(io,buf,1);
     printf("changed: %x (wstat=%d)\n",to,stat);
    }
   }
  } else if (argv[2][0] == 'w') {
  } else if (argv[2][0] == 'l') {
  } else {
  }
 } else {
  goto out;
 }


 return 0;
}




------------------------------

From: r@cLIeNUX. (cLIeNUX user)
Subject: Hey Viro
Date: Sun, 10 Jun 2001 03:49:04 -0000

man-pages 1.38, man 5 fs  

.B ext
is an elaborate extension of the
.B minix
filesystem.  It has been completely superseded by the second version
of the extended filesystem
.RB ( ext2 )
and will eventually be removed from the kernel.
.\"----------------------------------------------------------------------
.TP
.B ext2
is the high performance disk filesystem used by Linux for fixed disks
as well as removable media.
.sp
The second extended filesystem was designed as an extension of the
extended file system
.RB ( ext ).
.B ext2
offers the best performance (in terms of speed and CPU usage) of
the filesystems supported under Linux.


.\" Copyright 1996 Daniel Quinlan ([EMAIL PROTECTED])


Rick Hohensee
www.clienux.com


------------------------------

From: Jim Bean <[EMAIL PROTECTED]>
Subject: Re: winmodem source file can be modified ?
Date: Sun, 10 Jun 2001 04:04:47 GMT

Might need to use kgcc instead of gcc. Its "special" for kernel type
use.
Jim

Maximus Idius2 wrote:
> 
> Hi all,
> 
> I have a Rex-PCI56K, from Ratoc system, which has source file and make file
> for
> Turbolinux 5.0, 6.0; Redhat 6.1, 6.2, slackware, etc., yet it does not run
> under
> redhat 7.1 or 7.0.
> 
> The makefile and source ptmodule.c is below. I wonder if anyone can give
> advice on what other files are needed and/or if they can be modified for
> just generic winmodem ?
> 
> TIAM
> 
> maximus idius
> 
> ---
> 
> ---   MAKEFILE  BEGINNING   ----
> 
> #
> # Makefile for the PCtel module
> #
> # Note! The CFLAGS definition is now inherited from the
> # parent makefile.
> #
> 
> HPATH    = ../../include
> FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net
> 
> HOSTCC   =gcc -I$(HPATH)
> HOSTCFLAGS =-O -fomit-frame-pointer
> 
> CROSS_COMPILE  =
> 
> COL_DEBUG_FLAGS =
> 
> AS =$(CROSS_COMPILE)as
> LD =$(CROSS_COMPILE)ld
> CC =$(CROSS_COMPILE)gcc -D__KERNEL__ -DMODULE -Wall $(HOSTCFLAGS) -I$(HPATH)
> ${COL_DEBUG_FLAGS}
> CPP =$(CC) -E
> AR =$(CROSS_COMPILE)ar
> NM =$(CROSS_COMPILE)nm
> STRIP =$(CROSS_COMPILE)strip
> MAKE =make
> 
> EXTRA_LDFLAGS :=
> 
> # object files directory
> 
> O_TARGET := ../../lib/pctel.o
> 
> # object files
> O_OBJS := \
>  ptmodule.o \
> 
> OX_OBJS := \
>  ../../lib/control.a \
>  ../../lib/hal.a \
>  ../../lib/dsp.a \
>  ../../lib/ptserial.a
> 
> all_targets: $(O_TARGET) $(L_TARGET)
> 
> %.s: %.c
>  $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -S $< -o $@
> 
> %.o: %.c
>  $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
> 
> %.o: %.s
>  $(AS) $(ASFLAGS) $(EXTRA_CFLAGS) -o $@ $<
> 
> ifdef O_TARGET
> ALL_O = $(O_OBJS) $(OX_OBJS)
> $(O_TARGET): $(ALL_O) Makefile
>  rm -f $@
>  $(LD) -r $(EXTRA_LDFLAGS) -o $@ $(ALL_O)
> endif
> 
> clean:
>  rm -f *.o
> ifdef L_TARGET
>  rm -f $(L_TARGET)
> endif
> ifdef O_TARGET
>  rm -f $(O_TARGET)
> endif
> 
> ---  END  MAKEFILE  ----
> 
> ---- Source:  ptmodule.c  ----
> 
> /*
>  * For the definition of __module_kernel_version[] so that
>  * the modem driver can be compatible with various Linux kernel
>  * versions.
>  *
>  * This file is to be linked with the rest of the libraries in
>  * the distribution package.
>  */
> 
> #include <linux/version.h>
> const char __module_kernel_version[] __attribute__((section(".modinfo"))) =
> "kernel_version=" UTS_RELEASE;
> #ifdef MODVERSIONS
> const char __module_using_checksums[] __attribute__((section(".modinfo"))) =
> "using_checksums=1";
> #endif
> 
> ---  END  SOURCE  ---

------------------------------

From: [EMAIL PROTECTED] (Paul Jackson)
Subject: Request for comment - notion for cpuset option in umask.
Date: 10 Jun 2001 05:35:44 GMT


Given Reiser's good suggestion to use umask in another thread,
concerning specifying an mmap base, I would like to ask for
comment on the following idea.

SGI and some other big-iron NUMA machine companies are looking
to propose some Linux features that will better support, not
surprisingly, big-iron NUMA machines.

We each have some existing extensions to our various proprietary
Unix-variants, but those end up adding system calls that
are, in my view, ugly architecture specific hacks.  So I am
looking to factor out of these sundry extensions the nuggets of
generic kernel mechanism that are sufficient to support most
of the various architecture specific constructs and policies.
I'd like a good system call interface, and then let the vendor
specific baroque extensions live above that, in user land.

See further the SourceForge project LSE (for Linux Scalability
Effort), if you are interested in this effort:

    https://sourceforge.net/projects/lse/

Anyhow, the first notion I'd like to abstract out is the notion
of limiting the scheduler to running a specific task on a
specified subset of the cpu's.  This is used to support various
interfaces, such as runon (aka cpuon), cpusets, partitions,
and various fork and exec variants that ask the kernel to run
a specifed task on particular cpu(s).

In particular, the Tux effort (Ingo Molnar) has already added
the essential element of this, with an entry in the task
structure called "cpus_allowed", and code in Tux to schedule
specific threads of Tux on specified cpus.  The interface to
set cpus_allowed (to anything other than the default 0xfff..fff,
for all cpus allowed) is, not surprisingly, Tux specific.

I propose that the proper, general, interface to manipulate
this bit vector is via ulimit.  There would be two bit vectors
- the max which could not be added to except by root, and the
current, which a process could add to and subtract from (set and
clear bits), up to the max.  The scheduler would only schedule
a task on cpus whose bit was set in the cpus_allowed vector
(in fact, the Linux scheduler, as of 2.4, already does that,
thanks to Tux).

One serious problem with this:

    We (SGI) need to plan for upwards of 100's, even a few
    thousand cpus, in time.  So this vector can't be a simple
    int, but rather needs be possibly longer ... at first blush
    I'd use an array of bits, rather like the fd_set type in
    sys/select.h, with a suitable size (not FD_SETSIZE, but
    something else, based on the max number of cpus supported
    for the system in question).

    The setrlimit/getrlimit interface allows for passing in
    one pair of longs, to set the max and current values for
    one specified limit.
    
    It would be outrageous, in my view, to have set/getrlimit,
    for one particular resource, interpret the two values, max
    and current, as pointers to bit vectors, rather than as
    simply values per se.

But otherwise, the use and meaning of set/getrlimit seems to
match this new intended purpose just right -- the set of
allowed cpus is yet another resource that can be limited
per task.

Any suggestions how to get around this gotcha, or of some
better way to skin this cat?

-- 

                          I won't rest till it's the best ...
                          Manager, Linux Scalability
                          Paul Jackson <[EMAIL PROTECTED]> 1.650.933.1373

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list by posting to the
comp.os.linux.development.system newsgroup.

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-System Digest
******************************

Reply via email to