Port-xen archive

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

Re: xensource: FreeBSD mappings guest heuristics



On Sunday 28 September 2008 15:22:02 Manuel Bouyer wrote:
> 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;
> +             }

How would you test this ?

Christoph


Home | Main Index | Thread Index | Old Index