From owner-freebsd-arch@FreeBSD.ORG Fri Jul 8 17:46:59 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CBA51065670; Fri, 8 Jul 2011 17:46:59 +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 4D1CA8FC0C; Fri, 8 Jul 2011 17:46:59 +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 D635C46B06; Fri, 8 Jul 2011 13:46:58 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 60E968A02E; Fri, 8 Jul 2011 13:46:58 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Date: Fri, 8 Jul 2011 13:14:43 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <20110708164844.GZ48734@deviant.kiev.zoral.com.ua> In-Reply-To: <20110708164844.GZ48734@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201107081314.44128.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 08 Jul 2011 13:46:58 -0400 (EDT) Cc: Kostik Belousov , Attilio Rao , Sergey Kandaurov , Peter Wemm Subject: Re: [PATCH] Add MAXCPU as a kernel config option and quality discussion on this X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2011 17:46:59 -0000 On Friday, July 08, 2011 12:48:44 pm Kostik Belousov wrote: > On Fri, Jul 08, 2011 at 05:37:17PM +0200, Attilio Rao wrote: > > I've made this patch for making MAXCPU a kernel config option: > > http://www.freebsd.org/~attilio/maxcpu_kernel_opt.diff > > > > Besides if this is a good idea or not (which I think it is) I want to > > discuss this implementation and similar related problems. > > In this case I've been forced to include opt_maxcpu.h in all the MD > > param.h implementations. A similar case, KSTACK_PAGES, includes the > > opt_kstack_pages.h only in the consumers. While this is possible for > > KSTACK_PAGES, because there are very little consumers, it would be > > impratical for MAXCPU. Besides, this is a very dangerous practice > > IMHO: if a consumer fails to add opt_kstack_pages it may end up with a > > faulty value, introducing a breakage that would go unnoticed. > > > > In my case, I think that including opt_maxcpu is a viable panacea, but > > in general, after discussing with peter@, probabilly the better idea > > would be having a centralized script that does pre-processing before > > to start compiling and set with the right values all those constants > > (something like genassym.c, but of course with a different purpose). > > > > What are your ideas on that? Do you think that including opt_maxcpu.h > > would be acceptable for the time being? > > I vote for putting MAXCPU in opt_global.h. > Why did you choosed separate opt header ? I agree this should just go into opt_global.h. -- John Baldwin