Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xensource: FreeBSD mappings guest heuristics



On Sun, Sep 28, 2008 at 01:38:09PM +0200, Christoph Egger wrote:
> 
> Hi,
> 
> XenSource added code to speed up page promotion for FreeBSD:
> 
> http://xenbits.xensource.com/staging/xen-unstable.hg?rev/840c0c3c185a
> 
> Can we do something similar for NetBSD ?

For i386 and i386PAE, we use the same values as FreeBSD, no changes needed.
For x86_64, we use different values for linear mappings,
and don't have a direct map. So we'd need something like that, I guess:

+             /* NetBSD 64bit: linear map 0x7F8000000000 */
+             switch ( level )
+             {
+             case 1: GUESS(0x7F8000000000UL
+                           + ((fault_addr & VADDR_MASK) >> 9), 6); break;
+             case 2: GUESS(0x7FBFC0000000UL
+                           + ((fault_addr & VADDR_MASK) >> 18), 6); break;
+             case 3: GUESS(0x7FBFDFE00000UL
+                           + ((fault_addr & VADDR_MASK) >> 27), 6); break;
+             }


-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index