diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2012-10-05 16:47:57 -0300 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-10-22 13:26:34 -0500 |
commit | ad0b5321f1f797274603ebbe20108b0750baee94 (patch) | |
tree | d66e04150cabc509f915b1ac7b13de163457816f /osdep.h | |
parent | f526f3c315d7c3ff7b7db39ae3a49f91d3a9986b (diff) | |
download | qemu-ad0b5321f1f797274603ebbe20108b0750baee94.zip qemu-ad0b5321f1f797274603ebbe20108b0750baee94.tar.gz qemu-ad0b5321f1f797274603ebbe20108b0750baee94.tar.bz2 |
Call MADV_HUGEPAGE for guest RAM allocations
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 <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'osdep.h')
-rw-r--r-- | osdep.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -108,6 +108,11 @@ void qemu_vfree(void *ptr); #else #define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID #endif +#ifdef MADV_HUGEPAGE +#define QEMU_MADV_HUGEPAGE MADV_HUGEPAGE +#else +#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID +#endif #elif defined(CONFIG_POSIX_MADVISE) |