From owner-freebsd-hackers Fri Aug 1 15:54:22 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id PAA16883 for hackers-outgoing; Fri, 1 Aug 1997 15:54:22 -0700 (PDT) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA16876 for ; Fri, 1 Aug 1997 15:54:17 -0700 (PDT) Received: (from root@localhost) by dyson.iquest.net (8.8.6/8.8.5) id RAA06093; Fri, 1 Aug 1997 17:42:48 -0500 (EST) From: "John S. Dyson" Message-Id: <199708012242.RAA06093@dyson.iquest.net> Subject: Re: Kernel howto, Second Request In-Reply-To: <199708012150.RAA03675@jenolan.rutgers.edu> from "David S. Miller" at "Aug 1, 97 05:50:03 pm" To: davem@jenolan.rutgers.edu (David S. Miller) Date: Fri, 1 Aug 1997 17:42:48 -0500 (EST) Cc: toor@dyson.iquest.net, Shimon@i-connect.net, FreeBSD-Hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > From: "John S. Dyson" > Date: Fri, 1 Aug 1997 16:18:33 -0500 (EST) > > Unlike certain (broken) systems, FreeBSD doesn't map all of phys > memory by default. This of course, saves address space for user > processes, and keeps physical memory size from being constrained by > kernel space limitations. > > Yes, but please do not ignore the fact that on modern architectures > (read as: 64-bit) it lacks any these limitations. (for example, on > the UltraSparc under Linux, the full 64-bit virtual address space is > given to the user, and arbitrarily large physical memory > configurations are supported, all this is done at zero cost, and it's > possible to be zero cost because of this "broken" system's design). > Not to mention the fact that in many cases it also makes SMP cheaper > (Linux only performs tlb flush cross calls during swapping, ptrace(), > and for user threads). > The problem is that we are getting questions about large systems now, and limiting phys mem is not an option for us on the PPro. Also, in FreeBSD if you want a mapping to stay around, you can leave it there. (I didn't realize that Linux mapped all of memory anyway, or does it?) I agree that on some architectures mapping all of memory into the kernel is almost free. On other architectures you don't have a choice, and on an X86 it is likely not needed and wasteful. Note that just because of a kernel mapping change it doesn't mean that a TLB flush is needed on ALL processors in every circumstance -- we currently do so too often, but it is only a matter of convienience (read laziness) right now. I have been working/studying the issue of more intelligent (and deferred) shootdowns, and will have some solutions soon, not be so lazy. Yep, for 64Bit architectures, it is probably okay to map all of physical memory -- but the generic kernel depending on it is a mistake (IMO.) There will be 32Bit machines in the future, where it can be advantageous to avoid mapping physical memory. The FreeBSD kernel structure as it is today can do with or without mapping physical memory, just as it can do with or without having the user process mapped when executing in the kernel. On PPros it appears that it is becoming a limitation in certain applications that I am supporting to restrict the physical memory to 1GByte or under -- and FreeBSD is even "limited" to approx 3GBytes (on a PPro.) All this said, I don't really know what Linux does, and that is likely a subject for a Linux mailing list or private email. :-). John dyson@freebsd.org