* [Qemu-devel] [PATCH] exec: Advise huge pages for the TCG code gen buffer
@ 2012-11-01 22:20 Richard Henderson
2012-12-08 17:52 ` Blue Swirl
0 siblings, 1 reply; 2+ messages in thread
From: Richard Henderson @ 2012-11-01 22:20 UTC (permalink / raw)
To: qemu-devel; +Cc: Blue Swirl, Anthony Liguori
After allocating 32MB or more contiguous memory, huge pages
would seem to be ideal.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
exec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/exec.c b/exec.c
index df67938..ab07f68 100644
--- a/exec.c
+++ b/exec.c
@@ -602,6 +602,8 @@ static inline void code_gen_alloc(size_t tb_size)
exit(1);
}
+ qemu_madvise(code_gen_buffer, code_gen_buffer_size, QEMU_MADV_HUGEPAGE);
+
/* Steal room for the prologue at the end of the buffer. This ensures
(via the MAX_CODE_GEN_BUFFER_SIZE limits above) that direct branches
from TB's to the prologue are going to be in range. It also means
--
1.7.11.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] exec: Advise huge pages for the TCG code gen buffer
2012-11-01 22:20 [Qemu-devel] [PATCH] exec: Advise huge pages for the TCG code gen buffer Richard Henderson
@ 2012-12-08 17:52 ` Blue Swirl
0 siblings, 0 replies; 2+ messages in thread
From: Blue Swirl @ 2012-12-08 17:52 UTC (permalink / raw)
To: Richard Henderson; +Cc: Anthony Liguori, qemu-devel
Thanks, applied.
On Thu, Nov 1, 2012 at 10:20 PM, Richard Henderson <rth@twiddle.net> wrote:
> After allocating 32MB or more contiguous memory, huge pages
> would seem to be ideal.
>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
> exec.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/exec.c b/exec.c
> index df67938..ab07f68 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -602,6 +602,8 @@ static inline void code_gen_alloc(size_t tb_size)
> exit(1);
> }
>
> + qemu_madvise(code_gen_buffer, code_gen_buffer_size, QEMU_MADV_HUGEPAGE);
> +
> /* Steal room for the prologue at the end of the buffer. This ensures
> (via the MAX_CODE_GEN_BUFFER_SIZE limits above) that direct branches
> from TB's to the prologue are going to be in range. It also means
> --
> 1.7.11.7
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-08 17:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-01 22:20 [Qemu-devel] [PATCH] exec: Advise huge pages for the TCG code gen buffer Richard Henderson
2012-12-08 17:52 ` Blue Swirl
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.