Skip to content
  • Marc-André Lureau's avatar
    dbb9e0f4
    Add memfd based hostmem · dbb9e0f4
    Marc-André Lureau authored
    
    
    Add a new memory backend, similar to hostmem-file, except that it
    doesn't need to create files. It also enforces memory sealing.
    
    This backend is mainly useful for sharing the memory with other
    processes.
    
    Note that Linux supports transparent huge-pages of shmem/memfd memory
    since 4.8. It is relatively easier to set up THP than a dedicate
    hugepage mount point by using "madvise" in
    /sys/kernel/mm/transparent_hugepage/shmem_enabled.
    
    Since 4.14, memfd allows to set hugetlb requirement explicitly.
    
    Pending for merge in 4.16 is memfd sealing support for hugetlb backed
    memory.
    
    Usage:
    -object memory-backend-memfd,id=mem1,size=1G
    
    Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
    Message-Id: <20180201132757.23063-5-marcandre.lureau@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    dbb9e0f4
    Add memfd based hostmem
    Marc-André Lureau authored
    
    
    Add a new memory backend, similar to hostmem-file, except that it
    doesn't need to create files. It also enforces memory sealing.
    
    This backend is mainly useful for sharing the memory with other
    processes.
    
    Note that Linux supports transparent huge-pages of shmem/memfd memory
    since 4.8. It is relatively easier to set up THP than a dedicate
    hugepage mount point by using "madvise" in
    /sys/kernel/mm/transparent_hugepage/shmem_enabled.
    
    Since 4.14, memfd allows to set hugetlb requirement explicitly.
    
    Pending for merge in 4.16 is memfd sealing support for hugetlb backed
    memory.
    
    Usage:
    -object memory-backend-memfd,id=mem1,size=1G
    
    Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
    Message-Id: <20180201132757.23063-5-marcandre.lureau@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading