Date: Fri, 8 Jul 2011 09:43:14 -0700 From: mdf@FreeBSD.org To: Attilio Rao <attilio@freebsd.org> Cc: Sergey Kandaurov <pluknet@freebsd.org>, Peter Wemm <peter@freebsd.org>, freebsd-arch@freebsd.org Subject: Re: [PATCH] Add MAXCPU as a kernel config option and quality discussion on this Message-ID: <CAMBSHm-hFT=JVxx=6RjvEZECouuWZ3LJhXhKHD%2BEaB2%2B0bk8iA@mail.gmail.com> In-Reply-To: <CAJ-FndDZu0cBrVbH3W%2B8Tj86T5h%2BwwWqUVnjJO1rtXopKodNOA@mail.gmail.com> References: <CAJ-FndDZu0cBrVbH3W%2B8Tj86T5h%2BwwWqUVnjJO1rtXopKodNOA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 8, 2011 at 8:37 AM, Attilio Rao <attilio@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm-hFT=JVxx=6RjvEZECouuWZ3LJhXhKHD%2BEaB2%2B0bk8iA>
