qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qemu_vmalloc: align properly for transparent hu


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH] qemu_vmalloc: align properly for transparent hugepages and KVM
Date: Mon, 05 Sep 2011 13:21:21 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 09/05/2011 01:10 PM, Jan Kiszka wrote:
On 2011-09-05 10:07, Avi Kivity wrote:
>  To make good use of transparent hugepages, KVM requires that guest-physical
>  and host-virtual addresses share the low 21 bits (as opposed to just the low
>  12 bits normally required).
>
>  Adjust qemu_vmalloc() to honor that requirement.  Ignore it for small regions
>  to avoid fragmentation.
>
>  Signed-off-by: Avi Kivity<address@hidden>
>  ---
>   oslib-posix.c |   14 +++++++++++++-
>   1 files changed, 13 insertions(+), 1 deletions(-)
>
>  diff --git a/oslib-posix.c b/oslib-posix.c
>  index 196099c..a304fb0 100644
>  --- a/oslib-posix.c
>  +++ b/oslib-posix.c
>  @@ -35,6 +35,13 @@
>   extern int daemon(int, int);
>   #endif
>
>  +#if defined(__linux__)&&  defined(__x86_64__)
>  +   /* Use 2MB alignment so transparent hugepages can be used by KVM */

Aren't transparent hugepages also available in TCG mode? Then just
remove "by KVM" from subject and comment.

They are, but they don't require the special alignment.

--
error compiling committee.c: too many arguments to function




reply via email to

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