From owner-freebsd-current@FreeBSD.ORG Wed Oct 12 16:55:38 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1BCB16A46E; Wed, 12 Oct 2005 16:55:38 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6726B43D48; Wed, 12 Oct 2005 16:55:38 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (CPE0050040655c8-CM00111ae02aac.cpe.net.cable.rogers.com [70.30.70.180]) by elvis.mu.org (Postfix) with ESMTP id 483841A3C25; Wed, 12 Oct 2005 09:55:38 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 404B65141B; Wed, 12 Oct 2005 12:55:34 -0400 (EDT) Date: Wed, 12 Oct 2005 12:55:34 -0400 From: Kris Kennaway To: Max Laier Message-ID: <20051012165533.GA55776@xor.obsecurity.org> References: <20051011213800.GA8839@xor.obsecurity.org> <200510121237.07383.max@love2party.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: <200510121237.07383.max@love2party.net> User-Agent: Mutt/1.4.2.1i Cc: freebsd-current@freebsd.org, sparc64@freebsd.org, des@freebsd.org, Kris Kennaway Subject: Re: int/long confusion with maxbcache and maxswzone (fixes 6.0 on >12GB machines) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2005 16:55:38 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 12, 2005 at 12:36:50PM +0200, Max Laier wrote: > > -int maxswzone; /* max swmeta KVA storage */ > > -int maxbcache; /* max buffer cache KVA storage */ > > +long maxswzone; /* max swmeta KVA storage */ > > +long maxbcache; /* max buffer cache KVA storage */ > > > > However, des forgot to change the other definition of maxbcache in > > : > > > > extern int maxbcache; /* Max KVA for buffer cache */ > > > > In fact, it's a good thing he didn't. On sparc64 if you make that > > variable a long it causes 32-bit integer overflows elsewhere, which > > lead to severe filesystem damage on systems with >12GB RAM. With the > > above bug this is reduced to a hang at boot. >=20 > Isn't it enough to introduce the maximum values below? I imagine that th= e=20 > ultimate goal is to get rid of the constrains, which will be easier if we= =20 > already have enough bits. No, it's not. As I mentioned, on 5.x you can work around this problem by using the existing tunable to limit the parameter, but not on 6.0 unless you also revert long to int. Something is getting confused about whether that variable is a long or an int since it's inconsistently defined. Anyway, making these variables consistently long is a very bad idea until more of the system is ready for that - that was the first thing I tried when I identified the problem, and it completely destroyed all of my filesystems within seconds, requiring a reinstall. Kris --UugvWAfsgieZRqgk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDTUAFWry0BWjoQKURAjk5AJ9d29kLADXDiqvwMBuSllZoTQwCGACg/R+4 NoD4Wzq2N1iTjS/VVwU4nxk= =F249 -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk--