mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
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>
This commit is contained in:
parent
f526f3c315
commit
ad0b5321f1
2 changed files with 6 additions and 0 deletions
5
osdep.h
5
osdep.h
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue