Date: Wed, 29 Sep 2010 07:49:22 -0400 From: John Baldwin <jhb@freebsd.org> To: "Robert N. M. Watson" <rwatson@freebsd.org> Cc: sbruno@freebsd.org, "freebsd-current@FreeBSD.org" <freebsd-current@freebsd.org>, Joshua Neal <jdneal@gmail.com> Subject: Re: MAXCPU preparations Message-ID: <201009290749.22669.jhb@freebsd.org> In-Reply-To: <A0A7B3BB-806C-40EA-B8FE-344EF0C8A187@freebsd.org> References: <1285601161.7245.7.camel@home-yahoo> <1285699244.2454.63.camel@home-yahoo> <A0A7B3BB-806C-40EA-B8FE-344EF0C8A187@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, September 28, 2010 6:24:32 pm Robert N. M. Watson wrote: > > 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. Hmm, I'm not sure that is true. My feeling on mp_maxid is that it is the largest supported CPUID. Platforms that support hotplug would need to set mp_maxid such that it has room for hotpluggable CPUs. You don't want to go reallocate the UMA datastructures for every zone when a CPU is hotplugged for example. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009290749.22669.jhb>