From owner-freebsd-hackers Sun Mar 16 16:16:14 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E6EB37B401 for ; Sun, 16 Mar 2003 16:16:10 -0800 (PST) Received: from bluejay.mail.pas.earthlink.net (bluejay.mail.pas.earthlink.net [207.217.120.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 131F043F3F for ; Sun, 16 Mar 2003 16:16:10 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0507.cvx22-bradley.dialup.earthlink.net ([209.179.199.252] helo=mindspring.com) by bluejay.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 18uiIQ-0006Lf-00; Sun, 16 Mar 2003 16:16:06 -0800 Message-ID: <3E75136C.54F3A98@mindspring.com> Date: Sun, 16 Mar 2003 16:14:36 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Mark Tinguely Cc: andykinney@advantagecom.net, freebsd-hackers@FreeBSD.ORG Subject: Re: increasing KVA_PAGES and broken pthreads References: <200303151448.h2FEm4Mt089695@casselton.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4e75a06af8993549a3cb6d7bf53d0f5663ca473d225a0f487350badd9bab72f9c350badd9bab72f9c Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mark Tinguely wrote: > Intel x86 hardware allows windows of 4GB of virtual memory even if > you have the PSE-36 and the PAE extensions with more the 4GB of > physical memory. Sound a little like Intel's 64KB windows, but > if I remember correctly, the 4GB does not have to be contiguous. > > It would require a true MMU such as those in the 64 bit architectures > (AMD opteron, Intel ia64, sparc64) to simulataneously be able to use > more than 4GB of RAM. > > So far the thought it is better to go with a true 64 MMU than take > and get a flat address space than take the performance hit (, plus > the memory loss for the much larger page table without much benefit) > than try to shuffle in the 4GB windows. Check the thread on this topic > in the archives. Jake Burkholder is doin PAE work in the context of FreeBSD. IMO, it should be committed in "pae386" instead of "i386" (e.g. treated like "pc98"). I don't know if this is possible, unless the hardware/software VM handling partition is sufficiently opaque (it should be, but there may be some border cases). Other than that, everything you've said is true, I think. I would add that that still leaves you with 4G of space to split between KVA and UVA, so it will not solve Mr. Kinney's problem in the least, since his problem is available kernel address space, not actual physical RAM. The KVA space *could* be split from the UVA space, giving 4G each, rather than 4G total. But for this to happen, you would have to decouple the kernel from dealing with process data that is passed to it from UVA by simply establishing page mappings for it, rather than copying it around. If you did that, it would, I think, drastically increase the amount of copying that happens on reads, writes, etc., and vastly slow down the copyin, copyout, uiomove, and similar functions, as well as making mmap of physical device memory, such as the AGP aperture used by X11 for AGP-enhanced video cards, rather harder to implement (if you consider that to access particular memory from user space may require moving elelments of your 4G window around, in the trap handler for page faults, you will see the problem). Practically, PAE/PSE-36 are not really useful, in that they do not keep you from bumping your head in the kernel or in user space processes, when it comes to available address space, which is *much* more important that the amount of available physical memory. And you can get 4G for each (per the above), without going to PAE/PSE-36. Short version: no matter what you do on a 32 bit architecture, a "char *" is going to be 32 bits. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message