From owner-freebsd-arch@FreeBSD.ORG Fri Jul 8 16:08:25 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 03FDF106566B; Fri, 8 Jul 2011 16:08:25 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id A70E18FC12; Fri, 8 Jul 2011 16:08:24 +0000 (UTC) Received: by gwb15 with SMTP id 15so1050322gwb.13 for ; Fri, 08 Jul 2011 09:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=7uuuLM6zLi16lLNfwG3t3sBGHvjjxj4DWbM8V1mPBoA=; b=L2mmWkKFYvhr8sD2gQrvNgS7xO7IxFGegcR+y1JRCwua9W57apttzL6woLU4hX85jb YP71Akjf/GO+0EDtUILvrzGYYgeB9VxQYwXnv8RP4Jx5tfXPy1U/9indtR73i5rd6ToP vTCsfeeTbkuytcsJeyg/GzwaSvkB5IomWJV7Q= MIME-Version: 1.0 Received: by 10.236.200.133 with SMTP id z5mr1052886yhn.272.1310139437367; Fri, 08 Jul 2011 08:37:17 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.236.31.4 with HTTP; Fri, 8 Jul 2011 08:37:17 -0700 (PDT) Date: Fri, 8 Jul 2011 17:37:17 +0200 X-Google-Sender-Auth: K_Ms-7-DyzQ1KBz-zfNB6Bv6zL8 Message-ID: From: Attilio Rao To: freebsd-arch@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: Sergey Kandaurov , Peter Wemm Subject: [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:08:25 -0000 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? Attilio -- Peace can only be achieved by understanding - A. Einstein