From owner-freebsd-bugs Wed Feb 28 3:17:42 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from dega.daemonium.com (dega.daemonium.com [204.138.50.74]) by hub.freebsd.org (Postfix) with ESMTP id 8CD2D37B718; Wed, 28 Feb 2001 03:17:39 -0800 (PST) (envelope-from pjp@dega.daemonium.com) Received: by dega.daemonium.com (Postfix, from userid 1000) id DDAA129A01; Wed, 28 Feb 2001 06:17:37 -0500 (EST) Date: Wed, 28 Feb 2001 06:17:37 -0500 From: Peter Philipp To: gnats-admin@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: kern/25445: /usr/src/usr.bin/vmstat/vmstat.c & /usr/src/sys/sys/malloc.h type differences Message-ID: <20010228061737.E7005@dega.daemonium.com> References: <200102280506.f1S56X199280@legolas.groupofnine.net> <200102280510.f1S5A1B20345@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200102280510.f1S5A1B20345@freefall.freebsd.org>; from gnats-admin@FreeBSD.org on Tue, Feb 27, 2001 at 09:10:01PM -0800 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Whoops I messed that up somewhat. Let's try again this time I won't write the patches because they are erroneous (and actually go back and break alpha while leaving i386 ok, it's a tug-of-war see :P go intel). I've also read up on the history why we are seeing this bug. Revision 1.46 in sys/malloc.h had a member type changed from long to int64_t. As far as I know a long for the alpha is 64 bits anyhow but a long for i386 is 32 bits. So it didn't do anything for the alpha in fact but increased the size of ks_calls to 64 bits for the i386. This created a type size problem for vmstat -m where the type for printing totreq was long which is 32 bits and not 64 bits. It creates this in a vmstat -m: Memory Totals: In Use Free Requests 94474K 1759K -2126966145 Perhaps the total requests should be printed as a quad_t which is independent of platform and always 64 bits it seems. Anyhow this seems to open a few cans of worms (shudder) and also goes back to size differences in structures such as struct malloc_type where on alpha a set of stats collected as type long can hold a lot more than on i386 which isn't fair and isn't consistent, which is unfortunately sucky. If I'm totally wrong here, I'd love a good explaining, cuz I'll need it. -- - - Peter Philipp Daemonium To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message