tech-kern archive

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

Re: kcpuset(9) questions

David Young <> wrote:
> I was using kcpuset(9) a little bit today and I was surprised that
> there was not a routine or a variable representing all of the attached
> CPUs.  I see that there is such a MI variable declared in <sys/cpu.h>,
> kcpuset_attached.  Should it be part of the API?

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.

> Also, kcpuset iterator would have been useful.  Perhaps there should be
> one?

There was no use case, when I added it.  Can you describe your use case?
Usually we iterate all CPUs with CPU_INFO_FOREACH() anyway (which should
also be replaced with a MI interface, but that requires non-trivial
invasion into all ports).


Home | Main Index | Thread Index | Old Index