[PATCH] Add MAXCPU as a kernel config option and quality discussion on this

Kostik Belousov kostikbel at gmail.com
Fri Jul 8 16:48:49 UTC 2011


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
> 
> 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?

I vote for putting MAXCPU in opt_global.h.
Why did you choosed separate opt header ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20110708/034c8d9c/attachment.pgp


More information about the freebsd-arch mailing list