From owner-freebsd-arch@FreeBSD.ORG Tue Jan 17 08:44:38 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A0B616A41F; Tue, 17 Jan 2006 08:44:38 +0000 (GMT) (envelope-from jroberson@chesapeake.net) Received: from webaccess-cl.virtdom.com (webaccess-cl.virtdom.com [216.240.101.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EBEE43D48; Tue, 17 Jan 2006 08:44:37 +0000 (GMT) (envelope-from jroberson@chesapeake.net) Received: from [10.0.0.1] (67-40-203-22.tukw.qwest.net [67.40.203.22]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.1/8.13.1) with ESMTP id k0H8iX8P083583; Tue, 17 Jan 2006 03:44:34 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Tue, 17 Jan 2006 00:42:57 -0800 (PST) From: Jeff Roberson X-X-Sender: jroberson@10.0.0.1 To: arch@freebsd.org Message-ID: <20060117002541.I602@10.0.0.1> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Scanned-By: MIMEDefang 2.52 on 216.240.101.25 Cc: alc@freebsd.org Subject: Large virtual page size support. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2006 08:44:38 -0000 I have implemented support in the vm for PAGE_SIZE values which are a multiple of the hardware page size. This is primarily useful for two things: 1) Shrinking the size of the vm page array so that very large memory x86 PAE machines may boot. 2) Improving performance of many operations due to decreased page list sizes as well as improved efficiency of many vm operations. In the particular application that this was developed for the fs block size, page size, and jumbo frame size were all made equal at 8k on a box with 4k pages. This made page flipping etc. very fast. This has been done with full userland backwards compatibility. Userland still has the ability to map things in native page size chunks. The majority of the system software remains unchanged. The vm gains some complexity and the elf loader gains some complexity since both need to be able to deal with native page size and virtual page size. The real page size is now CPU_PAGE_SIZE while PAGE_SIZE is the virtual page size which is the smallest unit of memory handed back by the page allocation routines. KVA is also managed in PAGE_SIZE chunks. The x86 pmap code has a small allocator that deals with allocating real pages for page table entries. I wrote this code for a client who would like for it to be in the freebsd tree. However, it does add some complexity and so I doubt freebsd wants it unless there is a clear demand for it. What I'd like to know is, does anyone else find this useful? Do the developers who work on the vm think this is just a horrible hack? Does anyone care about PAE anymore? Let me know what you think. The patch is available at http://www.chesapeake.net/~jroberson/8k.diff. It will not apply to any version of freebsd that you have. Please consider it read only and not testable until I decide whether it's worth porting. Cheers, Jeff