tech-kern archive

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

Re: kcpuset(9) questions



On Sun, Feb 03, 2013 at 11:33:10PM +0000, Mindaugas Rasiukevicius wrote:
> David Young <dyoung%pobox.com@localhost> wrote:
> > > There are kcpuset_attached and kcpuset_running, which are MI.  All ports
> > > ought to switch to them replacing MD cpu_attached/cpu_running.  They can
> > > be wrapped into a routine, but globals seem harmless in this case too.
> > 
> > It seems that if they are not wrapped in routines, they should be
> > declared differently, e.g.,
> > 
> > extern const kcpuset_t * const kcpuset_attached;
> 
> Although we are far from this, but in the long term we would like to
> support run time attaching/detaching of CPUs, so it would not be const.

It would be nice to have the compiler's help to avoid adding/deleting
CPUs to/from kcpuset_attached or kcpuset_running by accident.  Only the
kcpuset_{attached,running} implementation code should be writing those
sets.  Users of kcpuset_{attached,running} should only be reading them.

Dave

-- 
David Young
dyoung%pobox.com@localhost    Urbana, IL    (217) 721-9981


Home | Main Index | Thread Index | Old Index