Re: [Qemu-devel] [PATCH v3 27/35] postcopy/outgoing: implement forward/backword prefault

2012-11-01 Thread Isaku Yamahata
On Thu, Nov 01, 2012 at 02:10:45PM -0600, Eric Blake wrote: On 10/30/2012 02:33 AM, Isaku Yamahata wrote: When page is requested, send surrounding pages are also sent. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hmp-commands.hx | 15 - hmp.c

[PATCH v3 02/35] arch_init: DPRINTF format error and typo

2012-10-30 Thread Isaku Yamahata
missing % s/ram_save_live/ram_save_iterate/ Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch_init.c b/arch_init.c index e6effe8..79d4041 100644 --- a/arch_init.c +++ b/arch_init.c @@ -659,7 +659,7

[PATCH v3 01/35] migration.c: remove redundant line in migrate_init()

2012-10-30 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- migration.c |1 - 1 file changed, 1 deletion(-) diff --git a/migration.c b/migration.c index 62e0304..8fcb466 100644 --- a/migration.c +++ b/migration.c @@ -460,7 +460,6 @@ static MigrationState *migrate_init(const MigrationParams

[PATCH v3 06/35] osdep: add qemu_read_full() to read interrupt-safely

2012-10-30 Thread Isaku Yamahata
This is read counter part of qemu_write_full(). Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- osdep.c | 24 qemu-common.h |2 ++ 2 files changed, 26 insertions(+) diff --git a/osdep.c b/osdep.c index 3b25297..416ffe1 100644 --- a/osdep.c +++ b

[PATCH v3 14/35] arch_init: refactor ram_save_block() and export ram_save_block()

2012-10-30 Thread Isaku Yamahata
arch_init: factor out counting transferred bytes. This will be used by postcopy. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v2 - v3: - manual rebase - report ram_save_block Chnages v1 - v2: - don't refer last_block which can be NULL. And avoid possible infinite loop

[PATCH v3 16/35] arch_init/ram_load: refactor ram_load

2012-10-30 Thread Isaku Yamahata
ram_load_page() will be used by postcopy. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v2 - v3: - new --- arch_init.c | 137 +++ arch_init.h |3 ++ 2 files changed, 74 insertions(+), 66 deletions(-) diff --git

[PATCH v3 08/35] savevm/QEMUFile: consolidate QEMUFile functions a bit

2012-10-30 Thread Isaku Yamahata
- add qemu_file_fd() for later use - drop qemu_stdio_fd Now qemu_file_fd() replaces qemu_stdio_fd(). - savevm/QEMUFileSocket: drop duplicated member fd fd is already stored in QEMUFile so drop duplicated member QEMUFileSocket::fd. - remove QEMUFileSocket Signed-off-by: Isaku Yamahata yamah

[PATCH v3 10/35] savevm/QEMUFile: add read/write QEMUFile on memory buffer

2012-10-30 Thread Isaku Yamahata
This will be used by postcopy/incoming part. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- qemu-file.h |4 savevm.c| 60 +++ 2 files changed, 64 insertions(+) diff --git a/qemu-file.h b/qemu-file.h index 94557ea

[PATCH v3 33/35] arch_init: export migration_bitmap_sync and helper method to get bitmap

2012-10-30 Thread Isaku Yamahata
Those migration bitmap operation will be used by postcopy. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c |7 ++- migration.h |2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch_init.c b/arch_init.c index 48f45cd..49fbaff 100644

[PATCH v3 34/35] postcopy/outgoing: introduce precopy_count parameter

2012-10-30 Thread Isaku Yamahata
Precopy with this loop number before postcopy mode. This will be implemented by the next patch. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hmp-commands.hx | 10 ++ hmp.c|2 ++ migration-postcopy.c |2 +- migration.c |2

[PATCH v3 31/35] arch_init: export ram_save_iterate()

2012-10-30 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c | 11 --- arch_init.h |1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch_init.c b/arch_init.c index f86a0b4..48f45cd 100644 --- a/arch_init.c +++ b/arch_init.c @@ -633,7 +633,7 @@ static int

[PATCH v3 32/35] postcopy: pre+post optimization incoming side

2012-10-30 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- migration-postcopy.c | 207 +- 1 file changed, 204 insertions(+), 3 deletions(-) diff --git a/migration-postcopy.c b/migration-postcopy.c index 421fb39..9298cd4 100644 --- a/migration

[PATCH v3 35/35] postcopy: pre+post optimization outgoing side

2012-10-30 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c |6 ++-- migration-postcopy.c | 94 +++--- migration.h |1 + 3 files changed, 94 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index

[PATCH v3 29/35] postcopy/outgoing: add movebg mode(-m) to migration command

2012-10-30 Thread Isaku Yamahata
When movebg mode is enabled, the point to send background page is set to the next page to on-demand page. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hmp-commands.hx |8 +--- hmp.c|3 ++- migration-postcopy.c |8 migration.c

[PATCH v3 30/35] arch_init: factor out ram_load

2012-10-30 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c | 13 ++--- arch_init.h |3 +++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/arch_init.c b/arch_init.c index 9137013..f86a0b4 100644 --- a/arch_init.c +++ b/arch_init.c @@ -867,7 +867,9 @@ int

[PATCH v3 28/35] arch_init: factor out setting last_block, last_offset

2012-10-30 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c | 10 +++--- arch_init.h |1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch_init.c b/arch_init.c index d95ce7b..9137013 100644 --- a/arch_init.c +++ b/arch_init.c @@ -416,6 +416,12 @@ static void

[PATCH v3 26/35] postcopy/outgoing: add -n options to disable background transfer

2012-10-30 Thread Isaku Yamahata
This is for benchmark purpose Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hmp-commands.hx | 10 ++ hmp.c|4 +++- migration-postcopy.c |7 +++ migration.c |4 +++- migration.h |1 + qapi-schema.json |2

[PATCH v3 25/35] postcopy: implement outgoing part of postcopy live migration

2012-10-30 Thread Isaku Yamahata
This patch implements postcopy live migration for outgoing part Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v2 - v3: - modify savevm_ram_handlers instead of if (postcopy) - code simplification Changes v1 - v2: - fix parameter to qemu_fdopen() - handle QEMU_UMEM_REQ_EOC

[PATCH v3 27/35] postcopy/outgoing: implement forward/backword prefault

2012-10-30 Thread Isaku Yamahata
When page is requested, send surrounding pages are also sent. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hmp-commands.hx | 15 - hmp.c|3 +++ migration-postcopy.c | 57 +- migration.c

[PATCH v3 23/35] postcopy: implement incoming part of postcopy live migration

2012-10-30 Thread Isaku Yamahata
This patch implements postcopy live migration for incoming part Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v2 - v3: - threading, not fork - use blocking io instead of select + non-blocking io - don't modify RAMBlock - When device allocates its own RAM region, e.g. vshmem

[PATCH v3 24/35] postcopy outgoing: add -p option to migrate command

2012-10-30 Thread Isaku Yamahata
Added -p option to migrate command for postcopy mode and introduce postcopy parameter for migration to indicate that postcopy mode is enabled. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Chnages v1 - v2: - catch up for qapi change --- hmp-commands.hx | 10 ++ hmp.c

[PATCH v3 20/35] osdep: add QEMU_MADV_REMOVE and tirivial fix

2012-10-30 Thread Isaku Yamahata
MADV_REMOVE will be used by postcopy. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- osdep.h | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/osdep.h b/osdep.h index c5fd3d9..9e97f39 100644 --- a/osdep.h +++ b/osdep.h @@ -113,6 +113,11 @@ void

[PATCH v3 15/35] arch_init/ram_save_setup: factor out bitmap alloc/free

2012-10-30 Thread Isaku Yamahata
This will be used by postcopy. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v2 - v3: - new --- arch_init.c | 25 ++--- migration.h |2 ++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index ad1b01b..7e6d84e

[PATCH v4 1/2] export necessary symbols

2012-10-30 Thread Isaku Yamahata
Cc: Andrea Arcangeli aarca...@redhat.com Cc: Avi Kivity a...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- mm/memcontrol.c |1 + mm/mempolicy.c |1 + mm/shmem.c |1 + 3 files changed, 3 insertions(+) diff --git a/mm

[PATCH v4 0/2] postcopy migration: uvmem: Linux char device for postcopy

2012-10-30 Thread Isaku Yamahata
padded to align - un-KVM KVM_VMEM - UMEM - dropped some ioctl commands as Avi requested Isaku Yamahata (2): export necessary symbols umem: chardevice for kvm postcopy Documentation/misc-devices/uvmem.txt | 292 drivers/char/Kconfig | 10 + drivers/char/Makefile

[PATCH v3 21/35] postcopy: introduce helper functions for postcopy

2012-10-30 Thread Isaku Yamahata
This patch introduces helper function for postcopy to access umem char device and to communicate between incoming-qemu and umemd. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- changes v2 - v3: - error check, don't abort - typedef - #ifdef CONFIG_LINUX - code simplification changes v1

[PATCH v3 22/35] savevm: add new section that is used by postcopy

2012-10-30 Thread Isaku Yamahata
This is used by postcopy to tell the total length of QEMU_VM_SECTION_FULL and QEMU_VM_SUBSECTION from outgoing to incoming. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- savevm.c |4 1 file changed, 4 insertions(+) diff --git a/savevm.c b/savevm.c index 93c51ab..c93b6eb

[PATCH v3 18/35] migration: export migrate_fd_completed() and migrate_fd_cleanup()

2012-10-30 Thread Isaku Yamahata
This will be used by postcopy migration. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- migration.c |4 ++-- migration.h |2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/migration.c b/migration.c index 8fcb466..00b0bc2 100644 --- a/migration.c +++ b

[PATCH v3 19/35] uvmem.h: import Linux uvmem.h and teach update-linux-headers.sh

2012-10-30 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- linux-headers/linux/uvmem.h | 41 +++ scripts/update-linux-headers.sh |2 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 linux-headers/linux/uvmem.h diff --git a/linux

[PATCH v4 2/2] umem: chardevice for kvm postcopy

2012-10-30 Thread Isaku Yamahata
pbonz...@redhat.com Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v4 - v5: - rename umem to uvmem to avoid name conflict Changes v3 - v4: - simplified umem_init: kill {a,}sync_req_max - make fault handler killable even when core-dumping - documentation Changes v2 - v3: - made

[PATCH v3 17/35] arch_init: factor out logic to find ram block with id string

2012-10-30 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c | 31 --- arch_init.h |1 + exec.c | 12 ++-- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/arch_init.c b/arch_init.c index c77e24d..d82316d 100644

[PATCH v3 07/35] savevm: export qemu_peek_buffer, qemu_peek_byte, qemu_file_skip, qemu_fflush

2012-10-30 Thread Isaku Yamahata
Those will be used by postcopy. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- qemu-file.h |4 savevm.c|8 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index 9c8985b..9b6dd08 100644 --- a/qemu-file.h +++ b/qemu

[PATCH v3 12/35] arch_init: export RAM_SAVE_xxx flags for postcopy

2012-10-30 Thread Isaku Yamahata
Those constants will be also used by postcopy. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c |8 arch_init.h |8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch_init.c b/arch_init.c index a312434..4b65221 100644

[PATCH v3 11/35] savevm, buffered_file: introduce method to drain buffer of buffered file

2012-10-30 Thread Isaku Yamahata
be sent quickly. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- buffered_file.c | 59 +-- buffered_file.h |1 + qemu-file.h |1 + savevm.c|7 +++ 4 files changed, 58 insertions(+), 10 deletions(-) diff

[PATCH v3 09/35] savevm/QEMUFile: introduce qemu_fopen_fd

2012-10-30 Thread Isaku Yamahata
Introduce fd read/write backend of QEMUFile whose fd can be non-blocking This will be used by postcopy live migration. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- qemu-file.h |1 + savevm.c| 35 +++ 2 files changed, 36 insertions(+) diff

[PATCH v3 05/35] protect the ramlist with a separate mutex

2012-10-30 Thread Isaku Yamahata
From: Umesh Deshpande udesh...@redhat.com From: Umesh Deshpande udesh...@redhat.com Add the new mutex that protects shared state between ram_save_live and the iothread. If the iothread mutex has to be taken together with the ramlist mutex, the iothread shall always be _outside_. Signed-off-by:

[PATCH v3 04/35] add a version number to ram_list

2012-10-30 Thread Isaku Yamahata
From: Umesh Deshpande udesh...@redhat.com From: Umesh Deshpande udesh...@redhat.com This will be used to detect if last_block might have become invalid across different calls to ram_save_live. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Umesh Deshpande udesh...@redhat.com

[PATCH v3 00/35] postcopy live migration

2012-10-30 Thread Isaku Yamahata
| | V V migration completesexit() Isaku Yamahata (32): migration.c: remove redundant line in migrate_init() arch_init: DPRINTF format error and typo osdep: add qemu_read_full() to read

[PATCH v3 03/35] split MRU ram list

2012-10-30 Thread Isaku Yamahata
From: Paolo Bonzini pbonz...@redhat.com From: Paolo Bonzini pbonz...@redhat.com Outside the execution threads the normal, non-MRU-ized order of the RAM blocks should always be enough. So manage two separate lists, which will have separate locking rules. Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH v3 00/35] postcopy live migration

2012-10-30 Thread Isaku Yamahata
by the end of the month of November and the post copy is only a small part of the technology developed. . Regards Benoit On 30 October 2012 08:32, Isaku Yamahata yamah...@valinux.co.jp wrote: This is the v3 patch series of postcopy migration. The trees is available

Re: [PATCH v2 35/41] postcopy: introduce helper functions for postcopy

2012-06-16 Thread Isaku Yamahata
On Thu, Jun 14, 2012 at 11:34:09PM +0200, Juan Quintela wrote: Isaku Yamahata yamah...@valinux.co.jp wrote: +//#define DEBUG_UMEM +#ifdef DEBUG_UMEM +#include sys/syscall.h +#define DPRINTF(format, ...)\ +do

Re: [Qemu-devel] [PATCH v2 33/41] postcopy: introduce -postcopy and -postcopy-flags option

2012-06-08 Thread Isaku Yamahata
On Fri, Jun 08, 2012 at 12:52:54PM +0200, Juan Quintela wrote: Isaku Yamahata yamah...@valinux.co.jp wrote: This patch prepares for postcopy livemigration. It introduces -postcopy option and its internal flag, migration_postcopy. It introduces -postcopy-flags for chaging the behavior

[PATCH v2 02/41] arch_init: export RAM_SAVE_xxx flags for postcopy

2012-06-04 Thread Isaku Yamahata
Those constants will be also used by postcopy. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c |7 --- arch_init.h |7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index 38e0173..bd4e61e 100644 --- a/arch_init.c

[PATCH v2 01/41] arch_init: export sort_ram_list() and ram_save_block()

2012-06-04 Thread Isaku Yamahata
This will be used by postcopy. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c |4 ++-- migration.h |2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch_init.c b/arch_init.c index a9e8b74..38e0173 100644 --- a/arch_init.c +++ b/arch_init.c

[PATCH v2 12/41] arch_init: factor out setting last_block, last_offset

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c | 13 - arch_init.h |1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch_init.c b/arch_init.c index 2617478..22d9691 100644 --- a/arch_init.c +++ b/arch_init.c @@ -203,6 +203,12 @@ int

[PATCH v2 18/41] QEMUFile: add qemu_file_fd() for later use

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- qemu-file.h |1 + savevm.c| 12 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index 331ac8b..98a8023 100644 --- a/qemu-file.h +++ b/qemu-file.h @@ -71,6 +71,7 @@ QEMUFile

[PATCH v2 21/41] savevm: rename QEMUFileSocket to QEMUFileFD, socket_close to fd_close

2012-06-04 Thread Isaku Yamahata
Later the structure will be shared. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- savevm.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/savevm.c b/savevm.c index 4b560b3..2fb0c3e 100644 --- a/savevm.c +++ b/savevm.c @@ -187,14 +187,14

[PATCH v2 22/41] savevm/QEMUFile: introduce qemu_fopen_fd

2012-06-04 Thread Isaku Yamahata
Introduce nonblocking fd read backend of QEMUFile. This will be used by postcopy live migration. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- qemu-file.h |1 + savevm.c| 40 2 files changed, 41 insertions(+), 0 deletions(-) diff

[PATCH v2 17/41] savevm, buffered_file: introduce method to drain buffer of buffered file

2012-06-04 Thread Isaku Yamahata
Introduce a new method to drain the buffer of QEMUBufferedFile. When postcopy migration, buffer size can increase unboundedly. To keep the buffer size reasonably small, introduce the method to wait for buffer to drain. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- buffered_file.c

[PATCH v2 20/41] savevm/QEMUFileSocket: drop duplicated member fd

2012-06-04 Thread Isaku Yamahata
fd is already stored in QEMUFile so drop duplicated member QEMUFileSocket::fd. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- savevm.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/savevm.c b/savevm.c index ec9f5d0..4b560b3 100644 --- a/savevm.c +++ b

[PATCH v2 24/41] migration: export migrate_fd_completed() and migrate_fd_cleanup()

2012-06-04 Thread Isaku Yamahata
This will be used by postcopy migration. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- migration.c |4 ++-- migration.h |2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/migration.c b/migration.c index 753addb..48a8f68 100644 --- a/migration.c +++ b

[PATCH v2 15/41] savevm: export qemu_peek_buffer, qemu_peek_byte, qemu_file_skip

2012-06-04 Thread Isaku Yamahata
Those will be used by postcopy. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- qemu-file.h |3 +++ savevm.c|6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index 31b83f6..a285bef 100644 --- a/qemu-file.h +++ b/qemu-file.h

[PATCH v2 33/41] postcopy: introduce -postcopy and -postcopy-flags option

2012-06-04 Thread Isaku Yamahata
This patch prepares for postcopy livemigration. It introduces -postcopy option and its internal flag, migration_postcopy. It introduces -postcopy-flags for chaging the behavior of incoming postcopy mainly for benchmark/debug. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- migration.h

[PATCH v2 35/41] postcopy: introduce helper functions for postcopy

2012-06-04 Thread Isaku Yamahata
This patch introduces helper function for postcopy to access umem char device and to communicate between incoming-qemu and umemd. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- changes v1 - v2: - code simplification - make fault trigger more robust - introduce struct umem_pages

[PATCH v2 40/41] migrate: add -m (movebg) option to migrate command

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hmp-commands.hx |5 +++-- hmp.c|3 ++- migration.c |8 +++- migration.h |1 + qapi-schema.json |2 +- qmp-commands.hx |2 +- savevm.c |1 + 7 files changed, 16 insertions(+), 6

[PATCH v2 37/41] postcopy: implement outgoing part of postcopy live migration

2012-06-04 Thread Isaku Yamahata
This patch implements postcopy live migration for outgoing part Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v1 - v2: - fix parameter to qemu_fdopen() - handle QEMU_UMEM_REQ_EOC properly when PO_STATE_ALL_PAGES_SENT, QEMU_UMEM_REQ_EOC request was ignored. handle properly

[PATCH v2 38/41] postcopy/outgoing: add forward, backward option to specify the size of prefault

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hmp-commands.hx | 15 ++- hmp.c|3 +++ migration.c | 20 migration.h |2 ++ qapi-schema.json |3 ++- 5 files changed, 37 insertions(+), 6 deletions(-) diff --git a/hmp

[PATCH v2 32/41] savevm: add new section that is used by postcopy

2012-06-04 Thread Isaku Yamahata
This is used by postcopy to tell the total length of QEMU_VM_SECTION_FULL and QEMU_VM_SUBSECTION from outgoing to incoming. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- savevm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 318ec61

[PATCH v2 39/41] postcopy/outgoing: implement prefault

2012-06-04 Thread Isaku Yamahata
When page is requested, send surrounding pages are also sent. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- migration-postcopy.c | 56 + 1 files changed, 51 insertions(+), 5 deletions(-) diff --git a/migration-postcopy.c b/migration

[PATCH v2 34/41] postcopy outgoing: add -p and -n option to migrate command

2012-06-04 Thread Isaku Yamahata
Added -p option to migrate command for postcopy mode and introduce postcopy parameter for migration to indicate that postcopy mode is enabled. Add -n option for postcopy migration which indicates disabling background transfer. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Chnages v1

[PATCH v2 41/41] migration/postcopy: add movebg mode

2012-06-04 Thread Isaku Yamahata
When movebg mode is enabled, the point to send background page is set to the next page to on-demand page. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- migration-postcopy.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/migration-postcopy.c b/migration

[PATCH v2 36/41] postcopy: implement incoming part of postcopy live migration

2012-06-04 Thread Isaku Yamahata
This patch implements postcopy live migration for incoming part Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v3 - v4: - fork umemd early to address qemu devices touching guest ram via post/pre_load - code clean up on initialization - Makefile.target migration-postcopy.c

[PATCH v2 10/41] arch_init: simplify a bit by ram_find_block()

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c | 21 - exec.c | 12 ++-- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/arch_init.c b/arch_init.c index 9981abe..73bf250 100644 --- a/arch_init.c +++ b/arch_init.c

[PATCH v3 1/2] export necessary symbols

2012-06-04 Thread Isaku Yamahata
Cc: Andrea Arcangeli aarca...@redhat.com Cc: Avi Kivity a...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- mm/memcontrol.c |1 + mm/mempolicy.c |1 + mm/shmem.c |1 + 3 files changed, 3 insertions(+), 0 deletions

[PATCH v3 0/2] postcopy migration: umem: Linux char device for postcopy

2012-06-04 Thread Isaku Yamahata
ioctl structures padded to align - un-KVM KVM_VMEM - UMEM - dropped some ioctl commands as Avi requested Isaku Yamahata (2): export necessary symbols umem: chardevice for kvm postcopy Documentation/misc-devices/umem.txt | 303 drivers/char/Kconfig| 10 + drivers

[PATCH v3 2/2] umem: chardevice for kvm postcopy

2012-06-04 Thread Isaku Yamahata
pbonz...@redhat.com Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v3 - v4: - simplified umem_init: kill {a,}sync_req_max - make fault handler killable even when core-dumping - documentation Changes v2 - v3: - made fault handler killable - allow O_LARGEFILE - improve to handle

[PATCH v2 28/41] buffered_file: add qemu_file to read/write to buffer in memory

2012-06-04 Thread Isaku Yamahata
This is used by postcopy live migration. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- buffered_file.c | 50 ++ buffered_file.h | 10 ++ 2 files changed, 60 insertions(+), 0 deletions(-) diff --git a/buffered_file.c b

[PATCH v2 29/41] umem.h: import Linux umem.h

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- linux-headers/linux/umem.h | 42 ++ 1 files changed, 42 insertions(+), 0 deletions(-) create mode 100644 linux-headers/linux/umem.h diff --git a/linux-headers/linux/umem.h b/linux-headers/linux

[PATCH v2 31/41] configure: add CONFIG_POSTCOPY option

2012-06-04 Thread Isaku Yamahata
Add enable/disable postcopy mode. No dynamic test yet. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- configure | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 1f338f8..21de4cb 100755 --- a/configure +++ b/configure

[PATCH v2 25/41] migration: factor out parameters into MigrationParams

2012-06-04 Thread Isaku Yamahata
Introduce MigrationParams for parameters of migration. Cc: Orit Wasserman owass...@redhat.com Cc: Juan Quintela quint...@redhat.com Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v1 - v2: - catch up qapi change --- block-migration.c |8 migration.c | 21

[PATCH v2 23/41] migration.c: remove redundant line in migrate_init()

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- migration.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index 3f485d3..753addb 100644 --- a/migration.c +++ b/migration.c @@ -367,7 +367,6 @@ static MigrationState *migrate_init(int blk

[PATCH v2 27/41] buffered_file: Introduce QEMUFileNonblock for nonblock write

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- buffered_file.c | 115 +++ buffered_file.h | 13 ++ 2 files changed, 128 insertions(+), 0 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 22dd4c9..5198923 100644

[PATCH v2 19/41] savevm/QEMUFile: drop qemu_stdio_fd

2012-06-04 Thread Isaku Yamahata
Now qemu_file_fd() replaces qemu_stdio_fd(). Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- migration-exec.c |4 ++-- migration-fd.c |2 +- qemu-file.h |1 - savevm.c | 12 4 files changed, 3 insertions(+), 16 deletions(-) diff --git

[PATCH v2 30/41] update-linux-headers.sh: teach umem.h to update-linux-headers.sh

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- scripts/update-linux-headers.sh |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 9d2a4bc..2afdd54 100755 --- a/scripts/update-linux-headers.sh

[PATCH v2 26/41] buffered_file: factor out buffer management logic

2012-06-04 Thread Isaku Yamahata
This patch factors out buffer management logic. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- buffered_file.c | 141 +- buffered_file.h |8 +++ 2 files changed, 94 insertions(+), 55 deletions(-) diff --git a/buffered_file.c b

[PATCH v2 14/41] exec.c: export last_ram_offset()

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- exec-obsolete.h |1 + exec.c |4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/exec-obsolete.h b/exec-obsolete.h index 792c831..fb21dd7 100644 --- a/exec-obsolete.h +++ b/exec-obsolete.h @@ -25,6 +25,7

[PATCH v2 08/41] arch_init/ram_load: refactor ram_load

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c | 67 +- arch_init.h |1 + 2 files changed, 39 insertions(+), 29 deletions(-) diff --git a/arch_init.c b/arch_init.c index c861e30..bb0cd52 100644 --- a/arch_init.c

[PATCH v2 04/41] arch_init: refactor host_from_stream_offset()

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c | 25 ++--- arch_init.h |7 +++ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index 2a53f58..36ece1d 100644 --- a/arch_init.c +++ b/arch_init.c @@ -374,21

[PATCH v2 13/41] exec.c: factor out qemu_get_ram_ptr()

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- cpu-all.h |2 ++ exec.c| 51 +-- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/cpu-all.h b/cpu-all.h index 028528f..ff7f827 100644 --- a/cpu-all.h +++ b/cpu-all.h

[PATCH v2 11/41] arch_init: factor out counting transferred bytes

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c | 24 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch_init.c b/arch_init.c index 73bf250..2617478 100644 --- a/arch_init.c +++ b/arch_init.c @@ -155,8 +155,9 @@ static int

[PATCH v2 16/41] savevm: qemu_pending_size() to return pending buffered size

2012-06-04 Thread Isaku Yamahata
This will be used later by postcopy migration. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- qemu-file.h |1 + savevm.c|5 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index a285bef..880ef4b 100644 --- a/qemu-file.h +++ b

[PATCH v2 05/41] arch_init/ram_save_live: factor out RAM_SAVE_FLAG_MEM_SIZE case

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c | 21 ++--- migration.h |1 + 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index 36ece1d..28e5abb 100644 --- a/arch_init.c +++ b/arch_init.c @@ -287,6 +287,19

[PATCH v2 07/41] arch_init/ram_save_live: factor out ram_save_limit

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c | 28 migration.h |1 + 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/arch_init.c b/arch_init.c index 900cc8e..c861e30 100644 --- a/arch_init.c +++ b/arch_init.c @@ -311,9

[PATCH v2 09/41] arch_init: introduce helper function to find ram block with id string

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c | 13 + arch_init.h |1 + 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch_init.c b/arch_init.c index bb0cd52..9981abe 100644 --- a/arch_init.c +++ b/arch_init.c @@ -397,6 +397,19 @@ int

[PATCH v2 03/41] arch_init/ram_save: introduce constant for ram save version = 4

2012-06-04 Thread Isaku Yamahata
Introduce RAM_SAVE_VERSION_ID to represent version_id for ram save format. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- arch_init.c |2 +- arch_init.h |2 ++ vl.c|4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch_init.c b/arch_init.c

[PATCH v2 00/41] postcopy live migration

2012-06-04 Thread Isaku Yamahata
or not) | | V V migration completesexit() Isaku Yamahata (41): arch_init: export sort_ram_list() and ram_save_block() arch_init: export RAM_SAVE_xxx flags for postcopy

[PATCH v2 06/41] arch_init: refactor ram_save_block()

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Chnages v1 - v2: - don't refer last_block which can be NULL. And avoid possible infinite loop. --- arch_init.c | 82 +- arch_init.h |1 + 2 files changed, 48 insertions(+), 35

Re: Fwd: [Qemu-devel] [PATCH v2 00/41] postcopy live migration

2012-06-04 Thread Isaku Yamahata
On Mon, Jun 04, 2012 at 05:01:30AM -0700, Chegu Vinod wrote: Hello Isaku Yamahata, Hi. I just saw your patches..Would it be possible to email me a tar bundle of these patches (makes it easier to apply the patches to a copy of the upstream qemu.git) I uploaded them to github for those who

Re: [PATCH v2 00/41] postcopy live migration

2012-06-04 Thread Isaku Yamahata
On Mon, Jun 04, 2012 at 08:37:04PM +0800, Anthony Liguori wrote: On 06/04/2012 05:57 PM, Isaku Yamahata wrote: After the long time, we have v2. This is qemu part. The linux kernel part is sent separatedly. Changes v1 - v2: - split up patches for review - buffered file refactored - many

Re: Fwd: [Qemu-devel] [PATCH v2 00/41] postcopy live migration

2012-06-04 Thread Isaku Yamahata
On Mon, Jun 04, 2012 at 07:27:25AM -0700, Chegu Vinod wrote: On 6/4/2012 6:13 AM, Isaku Yamahata wrote: On Mon, Jun 04, 2012 at 05:01:30AM -0700, Chegu Vinod wrote: Hello Isaku Yamahata, Hi. I just saw your patches..Would it be possible to email me a tar bundle of these patches (makes

Re: [PATCHv2-RFC 1/2] shpc: standard hot plug controller

2012-02-13 Thread Isaku Yamahata
Oh nice work. On Mon, Feb 13, 2012 at 11:15:55AM +0200, Michael S. Tsirkin wrote: This adds support for SHPC interface, as defined by PCI Standard Hot-Plug Controller and Subsystem Specification, Rev 1.0 http://www.pcisig.com/specifications/conventional/pci_hot_plug/SHPC_10 Only SHPC

Re: [PATCHv2-RFC 1/2] shpc: standard hot plug controller

2012-02-13 Thread Isaku Yamahata
On Mon, Feb 13, 2012 at 01:49:32PM +0200, Michael S. Tsirkin wrote: On Mon, Feb 13, 2012 at 07:03:52PM +0900, Isaku Yamahata wrote: Oh nice work. On Mon, Feb 13, 2012 at 11:15:55AM +0200, Michael S. Tsirkin wrote: This adds support for SHPC interface, as defined by PCI Standard Hot

Re: [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2012-01-12 Thread Isaku Yamahata
On 12 January 2012 13:59, Avi Kivity a...@redhat.com wrote: On 01/04/2012 05:03 AM, Isaku Yamahata wrote: Yes, it's quite doable in user space(qemu) with a kernel-enhancement. And it would be easy to convert a separated daemon process into a thread in qemu. I think it should

Re: [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2012-01-12 Thread Isaku Yamahata
One more question. Does your architecture/implementation (in theory) allow KVM memory features like swap, KSM, THP? On Fri, Jan 13, 2012 at 11:03:23AM +0900, Isaku Yamahata wrote: Very interesting. We can cooperate for better (postcopy) live migration. The code doesn't seem available yet, I'm

Re: [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2012-01-03 Thread Isaku Yamahata
17 00:00:00 2001 Message-Id: e8bfda16a845eef4381872a331c6f0f200c3f7d7.1325055066.git.yamah...@valinux.co.jp In-Reply-To: cover.1325055065.git.yamah...@valinux.co.jp References: cover.1325055065.git.yamah...@valinux.co.jp From: Isaku Yamahata yamah...@valinux.co.jp Date: Thu, 11 Aug 2011 20:05:28

Re: [PATCH 21/21] postcopy: implement postcopy livemigration

2012-01-03 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 06:06:10PM +0200, Avi Kivity wrote: On 12/29/2011 03:26 AM, Isaku Yamahata wrote: This patch implements postcopy livemigration. +/* RAM is allocated via umem for postcopy incoming mode */ +#define RAM_POSTCOPY_UMEM_MASK (1 1) + typedef struct RAMBlock

Re: [Qemu-devel] [PATCH 00/21][RFC] postcopy live migration

2012-01-03 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 04:39:52PM -0600, Anthony Liguori wrote: TODO - benchmark/evaluation. Especially how async page fault affects the result. I'll review this series next week (Mike/Juan, please also review when you can). But we really need to think hard about whether this is the

Re: [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2011-12-29 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 04:55:11PM +0200, Avi Kivity wrote: On 12/29/2011 04:49 PM, Isaku Yamahata wrote: Great, then we agreed with list/reattach basically. (Maybe identity scheme needs reconsideration.) I guess we miscommunicated. Why is reattach needed? If you have the fd

Re: [PATCH 2/2] umem: chardevice for kvm postcopy

2011-12-29 Thread Isaku Yamahata
Thank you for review. On Thu, Dec 29, 2011 at 01:17:51PM +0200, Avi Kivity wrote: + default n + help + User process backed memory driver provides /dev/umem device. + The /dev/umem device is designed for some sort of distributed + shared memory. Especially post-copy live

Re: [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2011-12-29 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 02:55:42PM +0200, Avi Kivity wrote: On 12/29/2011 02:39 PM, Isaku Yamahata wrote: ioctl commands: UMEM_DEV_CRATE_UMEM: create umem device for qemu UMEM_DEV_LIST: list created umem devices UMEM_DEV_REATTACH: re-attach the created umem device

  1   2   >