From owner-freebsd-arch Sat Feb 8 23:46:11 2003 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 5160C37B401 for ; Sat, 8 Feb 2003 23:46:09 -0800 (PST) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0468643F85 for ; Sat, 8 Feb 2003 23:46:09 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id EC6962A8B4; Sat, 8 Feb 2003 23:46:04 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Jake Burkholder Cc: Alfred Perlstein , Jeff Roberson , arch@FreeBSD.ORG Subject: Re: New kernel allocation API In-Reply-To: <20030207234049.A32864@locore.ca> Date: Sat, 08 Feb 2003 23:46:04 -0800 From: Peter Wemm Message-Id: <20030209074604.EC6962A8B4@canning.wemm.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Jake Burkholder wrote: > Apparently, On Fri, Feb 07, 2003 at 08:16:59PM -0800, > Alfred Perlstein said words to the effect of; > > > * Jeff Roberson [030207 19:17] wrote: > > > > > > > > > On Fri, 7 Feb 2003, Alfred Perlstein wrote: > > > > > > > *snip* > > > > > > > > It seems that you've missed reading the original allocator or something , > > > > there's a cheap way to do this that doesn't require too much overhead. > > > > > > It seems that you've missed reading my email. > > > > > > "The old code used a large fixed size array that represented all of > > > kmem_map. This no longer works because the allocator can return pages > > > that are outside of kmem map. It does this on alpha, ia64, and sparc64 t o > > > use direct mapped regions of address space for kernel memory." > > > > > > > Yes there is a space tradeoff, but it avoids this pmap_kextract > > > > nonsense and multiple pointer dereferences. > > > > > > It's not so much nonsense as it is a solution. > > > > Doh, I guess I should be paying more attention, sorry for that. > > > > What advantage do you get from using direct mapped pages? Why not > > alias/map them into kmem map? I know you'd pay a penalty for the > > vm overhead, but you'd gain back the fixed array trick. I'm probably > > missing something? > > It lets you use the largest page size supported by the tlb (256 megs for > ia64 (!)), and it doesn't take a tlb shootdown to add or remove a mapping > because they never change. And there is hardware support for direct mapping on alpha as well, so it completely bypasses the TLB entirely for significant benefits. For x86-64 there'll likely be up to 2^39 of direct mapped space as well, but using 2MB pages (use an entire level 4 directory slot for direct mapping to avoid the APTD evilness). We just dont have the space to do this on plain x86 :-(. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message