Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jul 2011 10:21:50 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Attilio Rao <attilio@freebsd.org>
Cc:        Sergey Kandaurov <pluknet@freebsd.org>, freebsd-arch@freebsd.org
Subject:   Re: [PATCH] Add MAXCPU as a kernel config option and quality discussion on this
Message-ID:  <CAGE5yCrC3UsNkmm3zZtNKD-pvQ0LP8yGBiwNFMUKZo4ndVWZ-A@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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGE5yCrC3UsNkmm3zZtNKD-pvQ0LP8yGBiwNFMUKZo4ndVWZ-A>