From owner-cvs-all Fri Aug 30 1:35:43 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B1D237B400; Fri, 30 Aug 2002 01:35:36 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id C98DE43E6A; Fri, 30 Aug 2002 01:35:34 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id HAA16427; Fri, 30 Aug 2002 07:48:23 GMT Date: Fri, 30 Aug 2002 17:55:27 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Peter Wemm Cc: cvs-committers@FreeBSD.org, Subject: Re: cvs commit: src/sys/alpha/alpha machdep.c src/sys/alpha/include md_var.h src/sys/alpha/osf1 osf1_misc.c src/sys/i386/i386 machdep.c src/sys/i386/include md_var.h src/sys/ia64/ia64 In-Reply-To: <200208300404.g7U44c6C041012@freefall.freebsd.org> Message-ID: <20020830174914.H2794-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 29 Aug 2002, Peter Wemm wrote: > peter 2002/08/29 21:04:37 PDT > > Modified files: > sys/alpha/alpha machdep.c > sys/alpha/include md_var.h > sys/alpha/osf1 osf1_misc.c > sys/i386/i386 machdep.c > sys/i386/include md_var.h > sys/ia64/ia64 machdep.c > sys/ia64/include md_var.h > sys/kern subr_param.c vfs_bio.c > sys/pc98/i386 machdep.c > sys/powerpc/include md_var.h > sys/powerpc/powerpc machdep.c > sys/sparc64/include md_var.h > sys/sparc64/sparc64 machdep.c > sys/sys buf.h systm.h > sys/vm vm_init.c > Log: > Change hw.physmem and hw.usermem to unsigned long like they used to be > in the original hardwired sysctl implementation. > > The buf size calculator still overflows an integer on machines with large > KVA (eg: ia64) where the number of pages does not fit into an int. Use > 'long' there. > > Change Maxmem and physmem and related variables to 'long', mostly for > completeness. Machines are not likely to overflow 'int' pages in the > near term, but then again, 640K ought to be enough for anybody. This > comes for free on 32 bit machines, so why not? Because it is pessimal on 32-bit machines with correctly sized longs (2 * 32 bits), and doesn't move us any closer to using the correct types, which should be something like vm_size_t, but perhaps a little smaller. In practice, 32 bits is the best type for page counts on i386's. vm_size_t might need to be larger to physical memory sizes. This change has some technical problems such as a fatal printf format error on i386's. I will send more details privately. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message