qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH QEMU] transparent hugepage support


From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH QEMU] transparent hugepage support
Date: Thu, 11 Mar 2010 16:28:04 +0000
User-agent: KMail/1.12.4 (Linux/2.6.32-trunk-amd64; KDE/4.3.4; x86_64; ; )

> > +           /*
> > +            * Align on HPAGE_SIZE so "(gfn ^ pfn)&
> > +            * (HPAGE_SIZE-1) == 0" to allow KVM to take advantage
> > +            * of hugepages with NPT/EPT.
> > +            */
> > +           new_block->host = qemu_memalign(1<<  TARGET_HPAGE_BITS, size);

This should not be target dependent. i.e. it should be the host page size.

> That is a little wasteful.  How about a hint to mmap() requesting proper
> alignment (MAP_HPAGE_ALIGN)?

I'd kinda hope that we wouldn't need to. i.e. the host kernel is smart enough 
to automatically align large allocations anyway.

This is probably a useful optimization regardless of KVM.

Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]