From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Cc: dgilbert@redhat.com
Subject: [Qemu-devel] [PATCH v3 00/54] Creating RAMState for migration
Date: Thu, 6 Apr 2017 15:08:19 +0200 [thread overview]
Message-ID: <20170406130913.2232-1-quintela@redhat.com> (raw)
Hi
Contination of the previous series, addressed comments from Peter and Dave.
- All docs suggestions changed
- rename flush_page_queue to migration_page_queue()
- rebase on top of latest
- move the compression-switch logic
- change parameters to page_abs everywhere (notice that we end dropping them)
Please comment.
Later, Juan.
[v2]
Continuation of previous series, all review comments addressed. New things:
- Consolidate all function comments in the same style (yes, docs)
- Be much more careful with maintaining comments correct
- Move all postcopy fields to RAMState
- Move QEMUFile to RAMState
- rename qemu_target_page_bits() to qemu_target_page_size() to reflect use
- Remove MigrationState from functions that don't need it
- reorganize last_sent_block to the place where it is used/needed
- Move several places from offsets to pages
- Rename last_ram_offset() to last_ram_page() to refect use
Please comment.
[v1]
Currently, we have several places where we store informaticon about
ram for migration pruposes:
- global variables on migration/ram.c
- inside the accounting_info struct in migration/ram.c
notice that not all the accounting vars are inside there
- some stuff is in MigrationState, althought it belongs to migrate/ram.c
So, this series does:
- move everything related to ram.c to RAMState struct
- make all the statistics consistent, exporting them with an accessor
function
Why now?
Because I am trying to do some more optimizations about how we send
data around and it is basically impossible to do with current code, we
still need to add more variables. Notice that there are things like that:
- accounting info was only reset if we had xbzrle enabled
- How/where to initialize variables are completely inconsistent.
To Do:
- There are still places that access directly the global struct.
Mainly postcopy. We could finfd a way to make a pointer to the
current migration. If people like the approach, I will search where
to put it.
- I haven't posted any real change here, this is just the move of
variables to the struct and pass the struct around. Optimizations
will came after.
- Consolidate XBZRLE, Compression params, etc in its own structs
(inside or not RAMState, to be able to allocate ones, others, or
...)
Comments, please.
Chao Fan (1):
ram: Add page-size to output in 'info migrate'
Juan Quintela (53):
ram: Update all functions comments
ram: Rename flush_page_queue() to migration_page_queue_free()
ram: Rename block_name to rbname
ram: Create RAMState
ram: Add dirty_rate_high_cnt to RAMState
ram: Move bitmap_sync_count into RAMState
ram: Move start time into RAMState
ram: Move bytes_xfer_prev into RAMState
ram: Change byte_xfer_now type to uint64_t
ram: Move num_dirty_pages_period into RAMState
ram: Change num_dirty_pages_period type to uint64_t
ram: Move xbzrle_cache_miss_prev into RAMState
ram: Move iterations_prev into RAMState
ram: Move dup_pages into RAMState
ram: Remove unused dup_mig_bytes_transferred()
ram: Remove unused pages_skipped variable
ram: Move norm_pages to RAMState
ram: Remove norm_mig_bytes_transferred
ram: Move iterations into RAMState
ram: Move xbzrle_bytes into RAMState
ram: Move xbzrle_pages into RAMState
ram: Move xbzrle_cache_miss into RAMState
ram: Move xbzrle_cache_miss_rate into RAMState
ram: Move xbzrle_overflows into RAMState
ram: Move migration_dirty_pages to RAMState
ram: Everything was init to zero, so use memset
ram: Move migration_bitmap_mutex into RAMState
ram: Move migration_bitmap_rcu into RAMState
ram: Move bytes_transferred into RAMState
ram: Use the RAMState bytes_transferred parameter
ram: Remove ram_save_remaining
ram: Move last_req_rb to RAMState
ram: Move src_page_req* to RAMState
ram: Create ram_dirty_sync_count()
ram: Remove dirty_bytes_rate
ram: Move dirty_pages_rate to RAMState
ram: Move postcopy_requests into RAMState
ram: Add QEMUFile to RAMState
ram: Move QEMUFile into RAMState
ram: Remove compression_switch and inline its logic
migration: Remove MigrationState from migration_in_postcopy
ram: We don't need MigrationState parameter anymore
ram: Rename qemu_target_page_bits() to qemu_target_page_size()
ram: Pass RAMBlock to bitmap_sync
ram: ram_discard_range() don't use the mis parameter
ram: reorganize last_sent_block
ram: Use page number instead of an address for the bitmap operations
ram: Remember last_page instead of last_offset
ram: Change offset field in PageSearchStatus to page
ram: Use ramblock and page offset instead of absolute offset
ram: rename last_ram_offset() last_ram_pages()
ram: Use RAMBitmap type for coherence
migration: Remove MigrationState parameter from migration_is_idle()
exec.c | 10 +-
hmp.c | 3 +
include/exec/ram_addr.h | 6 +-
include/migration/migration.h | 41 +-
include/sysemu/sysemu.h | 2 +-
migration/migration.c | 44 +-
migration/postcopy-ram.c | 14 +-
migration/ram.c | 1194 ++++++++++++++++++++++-------------------
migration/savevm.c | 15 +-
migration/trace-events | 4 +-
qapi-schema.json | 5 +-
11 files changed, 700 insertions(+), 638 deletions(-)
--
2.9.3
next reply other threads:[~2017-04-06 13:09 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 13:08 Juan Quintela [this message]
2017-04-06 13:08 ` [Qemu-devel] [PATCH 01/54] ram: Update all functions comments Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 02/54] ram: Rename flush_page_queue() to migration_page_queue_free() Juan Quintela
2017-04-07 9:25 ` Dr. David Alan Gilbert
2017-04-11 3:44 ` Peter Xu
2017-04-06 13:08 ` [Qemu-devel] [PATCH 03/54] ram: Rename block_name to rbname Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 04/54] ram: Create RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 05/54] ram: Add dirty_rate_high_cnt to RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 06/54] ram: Move bitmap_sync_count into RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 07/54] ram: Move start time " Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 08/54] ram: Move bytes_xfer_prev " Juan Quintela
2017-04-11 3:47 ` Peter Xu
2017-04-06 13:08 ` [Qemu-devel] [PATCH 09/54] ram: Change byte_xfer_now type to uint64_t Juan Quintela
2017-04-07 9:39 ` Dr. David Alan Gilbert
2017-04-11 3:49 ` Peter Xu
2017-04-06 13:08 ` [Qemu-devel] [PATCH 10/54] ram: Move num_dirty_pages_period into RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 11/54] ram: Change num_dirty_pages_period type to uint64_t Juan Quintela
2017-04-07 9:44 ` Dr. David Alan Gilbert
2017-04-11 4:08 ` Peter Xu
2017-04-06 13:08 ` [Qemu-devel] [PATCH 12/54] ram: Move xbzrle_cache_miss_prev into RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 13/54] ram: Move iterations_prev " Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 14/54] ram: Move dup_pages " Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 15/54] ram: Remove unused dup_mig_bytes_transferred() Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 16/54] ram: Remove unused pages_skipped variable Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 17/54] ram: Move norm_pages to RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 18/54] ram: Remove norm_mig_bytes_transferred Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 19/54] ram: Move iterations into RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 20/54] ram: Move xbzrle_bytes " Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 21/54] ram: Move xbzrle_pages " Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 22/54] ram: Move xbzrle_cache_miss " Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 23/54] ram: Move xbzrle_cache_miss_rate " Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 24/54] ram: Move xbzrle_overflows " Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 25/54] ram: Move migration_dirty_pages to RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 26/54] ram: Everything was init to zero, so use memset Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 27/54] ram: Move migration_bitmap_mutex into RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 28/54] ram: Move migration_bitmap_rcu " Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 29/54] ram: Move bytes_transferred " Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 30/54] ram: Use the RAMState bytes_transferred parameter Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 31/54] ram: Remove ram_save_remaining Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 32/54] ram: Move last_req_rb to RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 33/54] ram: Move src_page_req* " Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 34/54] ram: Create ram_dirty_sync_count() Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 35/54] ram: Remove dirty_bytes_rate Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 36/54] ram: Move dirty_pages_rate to RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 37/54] ram: Move postcopy_requests into RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 38/54] ram: Add QEMUFile to RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 39/54] ram: Move QEMUFile into RAMState Juan Quintela
2017-04-06 13:08 ` [Qemu-devel] [PATCH 40/54] ram: Remove compression_switch and inline its logic Juan Quintela
2017-04-07 9:46 ` Dr. David Alan Gilbert
2017-04-11 4:14 ` Peter Xu
2017-04-18 18:17 ` Juan Quintela
2017-04-06 13:09 ` [Qemu-devel] [PATCH 41/54] migration: Remove MigrationState from migration_in_postcopy Juan Quintela
2017-04-06 13:09 ` [Qemu-devel] [PATCH 42/54] ram: We don't need MigrationState parameter anymore Juan Quintela
2017-04-06 13:09 ` [Qemu-devel] [PATCH 43/54] ram: Rename qemu_target_page_bits() to qemu_target_page_size() Juan Quintela
2017-04-06 13:09 ` [Qemu-devel] [PATCH 44/54] ram: Add page-size to output in 'info migrate' Juan Quintela
2017-04-06 13:09 ` [Qemu-devel] [PATCH 45/54] ram: Pass RAMBlock to bitmap_sync Juan Quintela
2017-04-07 10:01 ` Dr. David Alan Gilbert
2017-04-06 13:09 ` [Qemu-devel] [PATCH 46/54] ram: ram_discard_range() don't use the mis parameter Juan Quintela
2017-04-06 13:09 ` [Qemu-devel] [PATCH 47/54] ram: reorganize last_sent_block Juan Quintela
2017-04-06 13:09 ` [Qemu-devel] [PATCH 48/54] ram: Use page number instead of an address for the bitmap operations Juan Quintela
2017-04-07 10:26 ` Dr. David Alan Gilbert
2017-04-18 19:18 ` Juan Quintela
2017-04-06 13:09 ` [Qemu-devel] [PATCH 49/54] ram: Remember last_page instead of last_offset Juan Quintela
2017-04-07 10:39 ` Dr. David Alan Gilbert
2017-04-06 13:09 ` [Qemu-devel] [PATCH 50/54] ram: Change offset field in PageSearchStatus to page Juan Quintela
2017-04-06 13:09 ` [Qemu-devel] [PATCH 51/54] ram: Use ramblock and page offset instead of absolute offset Juan Quintela
2017-04-07 10:53 ` Dr. David Alan Gilbert
2017-04-06 13:09 ` [Qemu-devel] [PATCH 52/54] ram: rename last_ram_offset() last_ram_pages() Juan Quintela
2017-04-06 13:09 ` [Qemu-devel] [PATCH 53/54] ram: Use RAMBitmap type for coherence Juan Quintela
2017-04-06 13:09 ` [Qemu-devel] [PATCH 54/54] migration: Remove MigrationState parameter from migration_is_idle() Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170406130913.2232-1-quintela@redhat.com \
--to=quintela@redhat.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.