[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CPU Control



> On Thu, Nov 29, 2001 at 09:27:45PM +0200, Official Flamer/Cabal NON-Leader wrote:
> > On Thu, Nov 29, 2001 at 12:10:17PM +0200, Shachar Shemesh wrote:
> > > avi_kosk@netvision.net.il wrote:
> > > 
> > > >In a box with 2 CPUs, I am using RedHat kernel 2.4.7.
> > > >1) Is it possible to enable/disable, by software means, a specific CPU 
> > > >(cpu 0 | cpu 1) ?
> > > >
> > > >2) While both CPUs are enabled, can we enforce a program to run ONLY 
> > > >on a specific CPU ?
> > 
> > As far as I know, 1 is NO.
> > 
> > The short answer to 2 is also no. The slighty longer one is that, to the
> > best of my knowledge, CPU affinity is not in the kernel but I remember
> > Jseeing references to building it, somewhere.
> > 
> > It should be possible to bolt something very crude onto the current
> > scheduler, but it is not a trivial effort to do it properly...
> .
> .
> 
> There is a an uncomplanied-about patch for the 2.4/2.5 series.
> Actually there are two patches that differ only in their interface:
> Robert Love wants is in /proc, and Rik van Riel (I think) wants it
> as a system call. This issue alone is bound to keep the patches
> in the center of a flamewar for the next six months or so, and 
> therefore out of the kernel, but you can try searching the recent 
> list archives for it and apply it in the privacy of your own 
> /usr/src.
> 


Have you got an opinion about what is a better choice (system call or 
/proc)?

-- 

    Shaul Karl
    email: shaulka (replace these parenthesis with @) bezeqint,
           delete the comma and the white space characters and add .net



=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il