Subject: Re: Semi(?)-success with an SMP kernel
To: None <undisclosed-recipients>
From: Simon Burge <simonb@thistledown.com.au>
List: tech-smp
Date: 09/28/2000 10:10:12
------- Blind-Carbon-Copy

From: Simon Burge <simonb@wasabisystems.com>
To: sommerfeld@orchard.arlington.ma.us
Cc: tech-kern@netbsd.org
Subject: Re: Semi(?)-success with an SMP kernel 
In-Reply-To: Your message of "Wed, 27 Sep 2000 10:33:10 -0400 "
	<20000927143316.269DD2A1B@orchard.arlington.ma.us> 
Date: Thu, 28 Sep 2000 10:10:12 +1100
Sender: simonb@thoreau.thistledown.com.au

[ moved to tech-kern for sysctl vm.uvmexp failure ]

Bill Sommerfeld wrote:

> James Sharp wrote:
>
> > I tried getting top to run to show me what processes were running, but
> > I get a "sysctl vm.uvmexp failed: Cannot allocate memory" message...i
> > havent' really chased that down much.  Lack of sleep is catching up
> > with me.
> 
> Someone resized "struct uvmexp" by adding a new counter to the middle,
> which broke backwards-compat with the 1.5 version of "top"; you need
> to rebuild top against the -current system headers.

My first thought was to suggest a struct uvmexp2 with fixed sized
fields, which is still probably something we want to do.

But for the simple case here, I think the problem here is that sysctl
is failing because top is requesting N bytes of data (the size of the
uvmexp struct in 1.5), and the structure is now N + M bytes long.  Also,
the data that top is looking for hasn't moved with the new additions.
So, how about we put a comment in struct uvmexp2 just after "int wired;"
saying "put nothing above here - it will break binary compat with 1.5",
and change the sysctl so that it doesn't fail if there is a short data
request?

Simon.
- --
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Sales, Support and Service:  http://www.wasabisystems.com/

------- End of Blind-Carbon-Copy