From owner-freebsd-current@FreeBSD.ORG Wed Sep 29 13:26:02 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D44C1065672; Wed, 29 Sep 2010 13:26:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2C7F28FC35; Wed, 29 Sep 2010 13:26:02 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CE43746B9B; Wed, 29 Sep 2010 09:26:01 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B26018A04E; Wed, 29 Sep 2010 09:26:00 -0400 (EDT) From: John Baldwin To: "Robert N. M. Watson" Date: Wed, 29 Sep 2010 07:49:22 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <1285601161.7245.7.camel@home-yahoo> <1285699244.2454.63.camel@home-yahoo> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201009290749.22669.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 29 Sep 2010 09:26:00 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: sbruno@freebsd.org, "freebsd-current@FreeBSD.org" , Joshua Neal Subject: Re: MAXCPU preparations X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2010 13:26:02 -0000 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