From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNrzt-0000RG-Ai for qemu-devel@nongnu.org; Mon, 15 Oct 2012 17:14:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNrzs-000662-5I for qemu-devel@nongnu.org; Mon, 15 Oct 2012 17:14:49 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:56003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNrzr-00063x-UA for qemu-devel@nongnu.org; Mon, 15 Oct 2012 17:14:48 -0400 Message-ID: <507C7CBE.5010103@msgid.tls.msk.ru> Date: Tue, 16 Oct 2012 01:14:38 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <20121005164758.4808b2d1@doriath.home> <20121015155754.54f11e01@doriath.home> In-Reply-To: <20121015155754.54f11e01@doriath.home> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Call MADV_HUGEPAGE for guest RAM allocations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aarcange@redhat.com, jan.kiszka@siemens.com, aliguori@us.ibm.com, qemu-devel On 15.10.2012 22:57, Luiz Capitulino wrote: > On Fri, 5 Oct 2012 16:47:57 -0300 > Luiz Capitulino wrote: > >> This makes it possible for QEMU to use transparent huge pages (THP) >> when transparent_hugepage/enabled=madvise. Otherwise THP is only >> used when it's enabled system wide. >> >> Signed-off-by: Luiz Capitulino > > ping? > >> --- >> exec.c | 1 + >> osdep.h | 5 +++++ >> 2 files changed, 6 insertions(+) >> >> diff --git a/exec.c b/exec.c >> index 1114a09..7504909 100644 >> --- a/exec.c >> +++ b/exec.c >> @@ -2584,6 +2584,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host, >> cpu_physical_memory_set_dirty_range(new_block->offset, size, 0xff); >> >> qemu_ram_setup_dump(new_block->host, size); >> + qemu_madvise(new_block->host, size, QEMU_MADV_HUGEPAGE); FWIW, there was another attempt to do something like this: https://lists.gnu.org/archive/html/qemu-devel/2012-08/msg02870.html I'm not sure it is right or not, I just tried to guess, but that one also went unanswered. Maybe you will have better luck. Thanks, /mjt