[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 23/27] postcopy: Allow hugepages
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PULL 23/27] postcopy: Allow hugepages |
Date: |
Tue, 28 Feb 2017 12:40:52 +0000 |
From: "Dr. David Alan Gilbert" <address@hidden>
Allow huge pages in postcopy.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
migration/postcopy-ram.c | 25 +------------------------
1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
index 03cbd6e..6b30b43 100644
--- a/migration/postcopy-ram.c
+++ b/migration/postcopy-ram.c
@@ -85,24 +85,6 @@ static bool ufd_version_check(int ufd)
}
/*
- * Check for things that postcopy won't support; returns 0 if the block
- * is fine.
- */
-static int check_range(const char *block_name, void *host_addr,
- ram_addr_t offset, ram_addr_t length, void *opaque)
-{
- RAMBlock *rb = qemu_ram_block_by_name(block_name);
-
- if (qemu_ram_pagesize(rb) > getpagesize()) {
- error_report("Postcopy doesn't support large page sizes yet (%s)",
- block_name);
- return -E2BIG;
- }
-
- return 0;
-}
-
-/*
* Note: This has the side effect of munlock'ing all of RAM, that's
* normally fine since if the postcopy succeeds it gets turned back on at the
* end.
@@ -122,12 +104,6 @@ bool postcopy_ram_supported_by_host(void)
goto out;
}
- /* Check for anything about the RAMBlocks we don't support */
- if (qemu_ram_foreach_block(check_range, NULL)) {
- /* check_range will have printed its own error */
- goto out;
- }
-
ufd = syscall(__NR_userfaultfd, O_CLOEXEC);
if (ufd == -1) {
error_report("%s: userfaultfd not available: %s", __func__,
@@ -139,6 +115,7 @@ bool postcopy_ram_supported_by_host(void)
if (!ufd_version_check(ufd)) {
goto out;
}
+ /* TODO: Only allow huge pages if the kernel supports it */
/*
* userfault and mlock don't go together; we'll put it back later if
--
2.9.3
- [Qemu-devel] [PULL 13/27] postcopy: Transmit and compare individual page sizes, (continued)
- [Qemu-devel] [PULL 13/27] postcopy: Transmit and compare individual page sizes, Dr. David Alan Gilbert (git), 2017/02/28
- [Qemu-devel] [PULL 14/27] postcopy: Chunk discards for hugepages, Dr. David Alan Gilbert (git), 2017/02/28
- [Qemu-devel] [PULL 16/27] postcopy: enhance ram_block_discard_range for hugepages, Dr. David Alan Gilbert (git), 2017/02/28
- [Qemu-devel] [PULL 17/27] postcopy: Record largest page size, Dr. David Alan Gilbert (git), 2017/02/28
- [Qemu-devel] [PULL 15/27] exec: ram_block_discard_range, Dr. David Alan Gilbert (git), 2017/02/28
- [Qemu-devel] [PULL 18/27] postcopy: Plumb pagesize down into place helpers, Dr. David Alan Gilbert (git), 2017/02/28
- [Qemu-devel] [PULL 19/27] postcopy: Use temporary for placing zero huge pages, Dr. David Alan Gilbert (git), 2017/02/28
- [Qemu-devel] [PULL 20/27] postcopy: Load huge pages in one go, Dr. David Alan Gilbert (git), 2017/02/28
- [Qemu-devel] [PULL 21/27] postcopy: Mask fault addresses to huge page boundary, Dr. David Alan Gilbert (git), 2017/02/28
- [Qemu-devel] [PULL 22/27] postcopy: Send whole huge pages, Dr. David Alan Gilbert (git), 2017/02/28
- [Qemu-devel] [PULL 23/27] postcopy: Allow hugepages,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PULL 24/27] postcopy: Update userfaultfd.h header, Dr. David Alan Gilbert (git), 2017/02/28
- [Qemu-devel] [PULL 25/27] postcopy: Check for userfault+hugepage feature, Dr. David Alan Gilbert (git), 2017/02/28
- [Qemu-devel] [PULL 26/27] postcopy: Add doc about hugepages and postcopy, Dr. David Alan Gilbert (git), 2017/02/28
- [Qemu-devel] [PULL 27/27] postcopy: Add extra check for COPY function, Dr. David Alan Gilbert (git), 2017/02/28