Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Oct 2006 17:07:38 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Astrodog <astrodog@gmail.com>
Cc:        current@freebsd.org
Subject:   Re: [PATCH] MAXCPU alterable in kernel config - needs testers
Message-ID:  <20061008170555.D92182@fledge.watson.org>
In-Reply-To: <2fd864e0610080423q7ba6bdeal656a223e662a5d@mail.gmail.com>
References:  <2fd864e0610080423q7ba6bdeal656a223e662a5d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sun, 8 Oct 2006, Astrodog wrote:

> With the quad core processors coming out soon, this is going to become more 
> of an issue.. (Sun T1/2000s aside). This is basically the same patch from a 
> few months ago, with updated offsets.
>
> If you don't define MAXCPU in the kernel config, it reverts to old behavior. 
> It has no logic to keep you from shooting yourself in the foot though.. you 
> can define options SMP and options MAXCPU 128 on arm.

Changing MAXCPU is tricky, because it's not just used by the kernel, it's also 
used by user applications that use kmem to explore kernel data structures. 
libmemstat jumps through some rather awkward hopes to deal with data 
structures sized using MAXCPU.  Likewise, for CPU masks things get tricky. 
We need to address this issue, and need to make sure we do it on a coherent 
way or we'll start running into a variety of bugs associated with varying 
something that existing pieces of code think is invariant.  Unfortunately, 
it's not just a question of grepping user space for MAXCPU references, you 
also have to grep for the data structures that use MAXCPU...

Robert N M Watson
Computer Laboratory
University of Cambridge



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