From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1eUw-00042B-4K for qemu-devel@nongnu.org; Wed, 15 Aug 2012 10:23:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1eUv-0000kl-1W for qemu-devel@nongnu.org; Wed, 15 Aug 2012 10:23:02 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:45138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1eUu-0000kb-QB for qemu-devel@nongnu.org; Wed, 15 Aug 2012 10:23:00 -0400 Message-ID: <502BB0C2.3040701@msgid.tls.msk.ru> Date: Wed, 15 Aug 2012 18:22:58 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <502B99D0.8010808@msgid.tls.msk.ru> <502B9B40.6090307@redhat.com> In-Reply-To: <502B9B40.6090307@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] qemu and transparent huge pages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Andrea Arcangeli , qemu-devel On 15.08.2012 16:51, Avi Kivity wrote: > On 08/15/2012 03:45 PM, Michael Tokarev wrote: >> >> But apparently, THP does not work still, even with 2Mb >> alignment: when running a guest, AnonHugePages in >> /proc/meminfo stays at 0 - either in kvm mode or in tcg >> mode. Any idea why? What else is needed for THP to work? > > It does for me: > > AnonHugePages: 368640 kB > > Note the patch you reference doesn't impact thp, just kvm's ability to > propagate them to the shadow page table. > >> >> This is quite a frequent question in #kvm IRC channel, >> and I always suggested using -mem-path for this, but >> I'm curios why it doesn't work automatically when it >> probably should? >> > > Please provide extra info, like the setting of > /sys/kernel/mm/transparent_hugepage/enabled. That was it - sort of. Default value here is enabled=madvise. When setting it to always the effect finally started appearing, so it is actually working. But can't qemu set MADV_HUGEPAGE flag too, so it works automatically? Thanks, /mjt