Re: MAXCPU preparations

From: Robert N. M. Watson <rwatson_at_freebsd.org>
Date: Tue, 28 Sep 2010 23:24:32 +0100
On 28 Sep 2010, at 19:40, Sean Bruno wrote:

>> If you go fully dynamic you should use mp_maxid + 1 rather than maxcpus.
> 
> I assume that mp_maxid is the new kern.smp.maxcpus?  Can you inject some
> history here so I can understand why one is "better" than the other?

So, unlike maxcpus, mp_maxid is in theory susceptible to races in a brave new world in which we support hotplug CPUs -- a brave new world we're not yet ready for, however. If you do use mp_maxid, be aware you need to add one to get the size of the array -- maxcpus is the number of CPUs that can be used, whereas mp_maxid is the highest CPU ID (counting from 0) that is used.

Robert
Received on Tue Sep 28 2010 - 20:24:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:07 UTC