From owner-freebsd-arch@FreeBSD.ORG Fri Jul 8 17:51:32 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 B689A1065679; Fri, 8 Jul 2011 17:51:32 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 52FB78FC13; Fri, 8 Jul 2011 17:51:32 +0000 (UTC) Received: by gyf3 with SMTP id 3so1096591gyf.13 for ; Fri, 08 Jul 2011 10:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JBRKAxeJZFIDDhU0J1/dsfk/sLbknKW1P7O+jsnz0vk=; b=eIPmyhDeFaVu/ub8Cr7jy7m3cf7Df+sWQDMntdRxb3L5KVJ1VV5CKcp+xujxgGa7Zr xmDUM9PKD7b+z+4aZlWoyvVqh1hbbp72/6uq490UbEZheMmZzAwQTwTSihts149hqvd+ uUYahAoxh28QUx3O+w6cz2c2TOlJ/jyT481DA= MIME-Version: 1.0 Received: by 10.91.178.5 with SMTP id f5mr2206063agp.85.1310145710348; Fri, 08 Jul 2011 10:21:50 -0700 (PDT) Received: by 10.91.183.18 with HTTP; Fri, 8 Jul 2011 10:21:50 -0700 (PDT) In-Reply-To: References: Date: Fri, 8 Jul 2011 10:21:50 -0700 Message-ID: From: Peter Wemm To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Cc: Sergey Kandaurov , 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 17:51:32 -0000 On Fri, Jul 8, 2011 at 8:37 AM, Attilio Rao wrote: > I've made this patch for making MAXCPU a kernel config option: > http://www.freebsd.org/~attilio/maxcpu_kernel_opt.diff The problem with this is now you have to update all the kernel module build glue to create opt_maxcpu.h, including 3rd party modules. What about userland? We have constructs like this: amd64/include/reg.h: #if defined(_KERNEL) && !defined(_STANDALONE) #include "opt_compat.h" #endif Or even: #if defined(SMP) || defined(KLD_MODULE) #define MAXCPU 32 #else #define MAXCPU 1 #endif /* SMP || KLD_MODULE */ Putting opt_*.h references in include files is an invasive change and something we've gone to a great deal of effort to avoid. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell