From owner-freebsd-arch@FreeBSD.ORG Fri Jul 8 16:48:49 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 05BBF106566C; Fri, 8 Jul 2011 16:48:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 5A4BA8FC1C; Fri, 8 Jul 2011 16:48:48 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p68GmioX002441 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Jul 2011 19:48:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p68GmiI2058851; Fri, 8 Jul 2011 19:48:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p68Gmi0F058850; Fri, 8 Jul 2011 19:48:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 8 Jul 2011 19:48:44 +0300 From: Kostik Belousov To: Attilio Rao Message-ID: <20110708164844.GZ48734@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="I3A9QrhXlID9zuAO" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Sergey Kandaurov , Peter Wemm , freebsd-arch@freebsd.org 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 16:48:49 -0000 --I3A9QrhXlID9zuAO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 >=20 > 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. >=20 > 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). >=20 > 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 ? --I3A9QrhXlID9zuAO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk4XNOsACgkQC3+MBN1Mb4hLjgCfZgu0akl8CeDFWdzbp36q1sGt hqMAn0wq+6tChd4GJFbwBn38TVRSvaJq =hqJW -----END PGP SIGNATURE----- --I3A9QrhXlID9zuAO--