dm: use hugetlb by default

use hugetlb to set vm memory by default.

Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
Li, Fei1
2018-06-29 10:54:16 +08:00
committed by lijinxia
parent 136d5c30fb
commit 652e37e908
6 changed files with 27 additions and 46 deletions

View File

@@ -385,8 +385,7 @@ vm_setup_memory(struct vmctx *ctx, size_t memsize, enum vm_mmap_style vms)
objsize = ctx->lowmem;
}
if (hugetlb)
return hugetlb_setup_memory(ctx);
return hugetlb_setup_memory(ctx);
/*
* Stake out a contiguous region covering the guest physical memory
@@ -431,10 +430,8 @@ vm_setup_memory(struct vmctx *ctx, size_t memsize, enum vm_mmap_style vms)
void
vm_unsetup_memory(struct vmctx *ctx)
{
if (hugetlb) {
hugetlb_unsetup_memory(ctx);
return;
}
hugetlb_unsetup_memory(ctx);
return;
if (ctx->lowmem > 0)
munmap(ctx->mmap_lowmem, ctx->lowmem);