From owner-freebsd-arch@FreeBSD.ORG Fri Jul 8 16:43:15 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 9C6AD1065670 for ; Fri, 8 Jul 2011 16:43:15 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3B2248FC15 for ; Fri, 8 Jul 2011 16:43:14 +0000 (UTC) Received: by qwc9 with SMTP id 9so1378471qwc.13 for ; Fri, 08 Jul 2011 09:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=YunFjcVI0mC+067jE4bafIYqAzkje6/zzQZdKYa+Y9E=; b=rFzBGNMoXVYeuMozW62ngan0znZuJkTYcxKL9UC7Bxm1ObFotqK8OnnkzLNoGVqrta OpZ+N+XeFru5if/J15t4JeB/jNLdQ8lPOD20QuL58F2I/I4Ce0bGEiQP7GNKqy9sFXjL raYumu+E0xqddVdO7AoSkpeusju7hiBuncBro= MIME-Version: 1.0 Received: by 10.224.180.10 with SMTP id bs10mr1657863qab.318.1310143394229; Fri, 08 Jul 2011 09:43:14 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.229.62.229 with HTTP; Fri, 8 Jul 2011 09:43:14 -0700 (PDT) In-Reply-To: References: Date: Fri, 8 Jul 2011 09:43:14 -0700 X-Google-Sender-Auth: MLaUQoxb82SFWWye1VzuDpOKsjU Message-ID: From: mdf@FreeBSD.org To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 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:43:15 -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 > > 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? Isn't MAXCPU used frequently enough that it should be in opt_global.h? Or are we discouraging the use of opt_global.h and of MAXCPU such that that's not a practical solution? Thanks, matthew