From owner-cvs-all@FreeBSD.ORG Mon Jun 30 16:56:44 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC8C1106567F; Mon, 30 Jun 2008 16:56:44 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id 9FCCA8FC0C; Mon, 30 Jun 2008 16:56:44 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id 137172C2D34; Mon, 30 Jun 2008 11:56:44 -0500 (CDT) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7bL1kARVHsvS; Mon, 30 Jun 2008 11:56:36 -0500 (CDT) Received: from [216.63.78.18] (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 3816E2C2D35; Mon, 30 Jun 2008 11:56:36 -0500 (CDT) Message-ID: <48691043.3080403@cs.rice.edu> Date: Mon, 30 Jun 2008 11:56:35 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.13) Gecko/20070805 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ed Schouten References: <200806291835.m5TIZNLx089927@repoman.freebsd.org> <20080629211316.GA20319@edoofus.dev.vega.ru> <20080629215657.GI14567@hoeg.nl> In-Reply-To: <20080629215657.GI14567@hoeg.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alan Cox , cvs-src@freebsd.org, src-committers@freebsd.org, Ruslan Ermilov , cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/amd64/include pmap.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2008 16:56:44 -0000 Ed Schouten wrote: >Alan, > >* Ruslan Ermilov wrote: > > >>Can you please draw a new layout, similar to the one made by Peter? >> >>http://lists.freebsd.org/pipermail/freebsd-amd64/2005-July/005578.html >> >> > >I'm not familiar with the design of amd64 or its page tables, but is >there some kind of overhead when all 512 GB's would be allocated as kva? > > Yes, it would consume a rather large amount of (physical) memory. Roughly speaking, we preallocate memory for the page table that implements the kernel's address space. In other words, mapping a page into the kernel's address space never requires the allocation of (page table) memory, and unmapping a page never frees memory. This has some benefits, e.g., we will never block while mapping physical memory into the kernel's address space, and we can use a very simple, very fast method for mapping part of a file into the buffer cache. In general, that is, on most machine architectures, we can use a very simple technique to avoid preallocating page table memory that can't possibly be used. However, on amd64, the need to have kernel code and global/static variables in the highest 2GB of the kernel's address space undermines the effectiveness of that technique. So, it is still impractical to make the amd64 kernel address space arbitrarily large, as in 512GB. Alan