tech-kern archive

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

Re: kcpuset(9) questions



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.

> Well, iterating all CPUs would be one use case.  Another case would be
> to, say, iterate the CPUs where a message-signalled interrupt (MSI)
> handler should be established.
> 
> I was trying to decide the other night whether iterating a kcpuset_t w/
> a for-loop was unwieldy under my _first/_next proposal:

Any reason why do you need bitfield based iteration, as opposed to list
or array based?

-- 
Mindaugas


Home | Main Index | Thread Index | Old Index