On Wed, Dec 02, 2015 at 07:45:52AM -0700, Eric Blake wrote:
> On 12/01/2015 06:11 PM, Fam Zheng wrote:
> > Please explicitly mention that successful dump emits DUMP_COMPLETED without
> > error, and failed dump emits DUMP_COMPLETED that has an error str.
>
> In fact, I wonder if it would also be
On Wed, Dec 02, 2015 at 09:32:57AM +0800, Fam Zheng wrote:
> On Tue, 12/01 21:28, Peter Xu wrote:
> > @@ -333,6 +333,8 @@ static void write_data(DumpState *s, void *buf, int
> > length, Error **errp)
> > if (ret < 0) {
> > error_setg(errp
On Wed, Dec 02, 2015 at 09:11:31AM +0800, Fam Zheng wrote:
> On Tue, 12/01 21:28, Peter Xu wrote:
> > +
> > +##
> > +# @DUMP_COMPLETED
> > +#
> > +# Emitted when background dump has completed
> > +#
> > +# @error: #optional human-readable error string
ump
>From completed and total, we could know how much work
finished by calculating:
100.0 * completed / total (%)
Also, enrich DUMP_COMPLETED event to contain dump results when
finished.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
docs/qmp-events.txt | 5 -
dump.
One new QMP event DUMP_COMPLETED is added. When a dump finishes, one
DUMP_COMPLETED event will occur to notify the user.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
docs/qmp-events.txt | 16
dump.c | 15 ---
qapi-schema.json| 3 ++-
For now, it has no effect. It will be used in dump detach support.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c| 13 +
include/qemu-common.h | 4
qmp.c | 14 ++
3 files changed, 31 insertions(+)
diff --git a/dump.c b/
If "detach" is provided, one thread is created to do the dump work,
while main thread will return immediately. For each GuestPhysBlock,
adding one more field "mr" to points to MemoryRegion that it
belongs, also ref the mr before use.
Signed-off-by: Peter Xu <pet...@
No functional change. Cleanup only.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c| 31 +--
include/sysemu/dump.h | 3 +++
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/dump.c b/dump.c
index ccd56c8..f0ee9a8
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/dump.c b/dump.c
index f0ee9a8..aa9d1f8 100644
--- a/dump.c
+++ b/dump.c
@@ -1625,6 +1625,11 @@ void qmp_dump_guest_memory(bool paging, const char *file,
DumpState *s;
It will calculate percentage of finished work from completed and
total.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
hmp-commands-info.hx | 14 ++
hmp.c| 18 ++
hmp.h| 1 +
3 files changed, 33 insertions(+)
diff --git
On Mon, Dec 07, 2015 at 02:14:11PM +0800, Fam Zheng wrote:
> On Mon, 12/07 13:56, Peter Xu wrote:
> > +if (runstate_check(RUN_STATE_INMIGRATE)) {
> > +error_setg(errp, "Dump not allowed during incoming migration.");
> > +return;
> >
On Mon, Dec 07, 2015 at 02:21:44PM +0800, Fam Zheng wrote:
> On Mon, 12/07 13:56, Peter Xu wrote:
> > /* send DUMP_COMPLETED message (unconditionally) */
> > -qapi_event_send_dump_completed(!!local_err, (local_err ? \
> > +result = qmp_query_dump(NULL);
> >
Here, total_size is the size in bytes to be dumped (raw data, which
means before compression), while written_size are bytes handled (raw
size too).
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c| 32
include/sysemu/dump.h | 9 ++
This patch only adds the interfaces, but does not implement them.
"detach" parameter is made optional, to make sure that all the old
dump-guest-memory requests will still be able to work.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c | 5 +++--
hmp-
turn immediately.
- When dump finished, will receive event DUMP_COMPLETED.
- test query-dump before/during/after dump
- test kdump with zlib compression, w/ and w/o detach
- libvirt
- test "virsh dump --memory-only" with default format and
kdump-zlib format, work as usual
P
It might be a little bit confusing and error prone to do
dump_cleanup() in these two functions. A better way is to do
dump_cleanup() before dump finish, no matter whether dump has
succeeded or not.
Signed-off-by: Peter Xu <pet...@redhat.com>
Reviewed-by: Fam Zheng <f...@redhat.com>
Instead of malloc/free each time for DumpState, make it
static. Added DumpStatus to show status for dump.
This is to be used for detached dump.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c| 21 -
include/sysemu/dump.h | 2 ++
qapi-schem
uery-dump before/during/after dump
- test kdump with zlib compression, w/ and w/o detach
- libvirt
- test "virsh dump --memory-only" with default format and
kdump-zlib format, work as usual
Peter Xu (11):
dump-guest-memory: cleanup: removing dump_{error|cleanup}().
dump-guest-me
It might be a little bit confusing and error prone to do
dump_cleanup() in these two functions. A better way is to do
dump_cleanup() before dump finish, no matter whether dump has
succeeded or not.
Signed-off-by: Peter Xu <pet...@redhat.com>
Reviewed-by: Fam Zheng <f...@redhat.com>
No functional change. Cleanup only.
Signed-off-by: Peter Xu <pet...@redhat.com>
Reviewed-by: Fam Zheng <f...@redhat.com>
---
dump.c| 31 +--
include/sysemu/dump.h | 3 +++
2 files changed, 24 insertions(+), 10 deletions(-)
diff --gi
It will calculate percentage of finished work from completed and
total.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
hmp-commands-info.hx | 14 ++
hmp.c| 17 +
hmp.h| 1 +
3 files changed, 32 insertions(+)
diff --git a/hmp-co
Signed-off-by: Peter Xu <pet...@redhat.com>
Reviewed-by: Fam Zheng <f...@redhat.com>
---
dump.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/dump.c b/dump.c
index f0ee9a8..aa9d1f8 100644
--- a/dump.c
+++ b/dump.c
@@ -1625,6 +1625,11 @@ void qmp_dump_guest_memory(bool p
This patch only adds the interfaces, but does not implement them.
"detach" parameter is made optional, to make sure that all the old
dump-guest-memory requests will still be able to work.
Signed-off-by: Peter Xu <pet...@redhat.com>
Reviewed-by: Fam Zheng <f...@redh
ump
>From completed and total, we could know how much work
finished by calculating:
100.0 * completed / total (%)
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c | 22 ++
qapi-schema.json | 32 +++-
qm
For now, it has no effect. It will be used in dump detach support.
Signed-off-by: Peter Xu <pet...@redhat.com>
Reviewed-by: Fam Zheng <f...@redhat.com>
---
dump.c| 13 +
include/qemu-common.h | 4
qmp.c | 14 ++
3 files
One new QMP event DUMP_COMPLETED is added. When a dump finishes, one
DUMP_COMPLETED event will occur to notify the user.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
docs/qmp-events.txt | 18 ++
dump.c | 19 +--
qapi/event.json
If "detach" is provided, one thread is created to do the dump work,
while main thread will return immediately. For each GuestPhysBlock,
adding one more field "mr" to points to MemoryRegion that it
belongs, also ref the mr before use.
Signed-off-by: Peter Xu <pet...@redha
Here, total_size is the size in bytes to be dumped (raw data, which
means before compression), while written_size are bytes handled (raw
size too).
Signed-off-by: Peter Xu <pet...@redhat.com>
Reviewed-by: Fam Zheng <f...@redhat.com>
---
dump.c
Instead of malloc/free each time for DumpState, make it
static. Added DumpStatus to show status for dump.
This is to be used for detached dump.
Signed-off-by: Peter Xu <pet...@redhat.com>
Reviewed-by: Fam Zheng <f...@redhat.com>
---
dump.c| 21 --
On Tue, Dec 01, 2015 at 04:09:48PM +0100, Paolo Bonzini wrote:
>
>
> On 01/12/2015 03:18, Peter Xu wrote:
> > I think (2) is better in term of lines of codes (and also
> > clear). However I may need to keep the QMP interface (to keep the
> > has_detach parameter in qmp
On Wed, Dec 02, 2015 at 08:46:49AM +0800, Fam Zheng wrote:
> On Tue, 12/01 21:28, Peter Xu wrote:
> > +if (*errp) {
> > +s->status = DUMP_STATUS_FAILED;
> > +} else {
> > +s->status = DUMP_STATUS_COMPLETED;
> > +}
> > +
>
On Wed, Dec 02, 2015 at 08:37:36AM +0800, Fam Zheng wrote:
> On Tue, 12/01 21:28, Peter Xu wrote:
> > It might be a little bit confusing to do dump_cleanup() in these two
> > functions and error prone. A better way is to do dump_cleanup()
>
> I would say "It might
On Wed, Dec 02, 2015 at 05:49:18PM +0800, Fam Zheng wrote:
> On Wed, 12/02 16:49, Peter Xu wrote:
> > On Wed, Dec 02, 2015 at 09:32:57AM +0800, Fam Zheng wrote:
> > > > @@ -1301,6 +1303,7 @@ static void write_dump_pages(DumpState *s, Error
> > > > **errp)
On Wed, Dec 02, 2015 at 08:50:48AM +0800, Fam Zheng wrote:
> On Tue, 12/01 21:28, Peter Xu wrote:
> > /* if there is a dump in background, we should wait until the dump
> > * finished */
> > if (dump_in_progress()) {
> > error_setg(errp, "Th
On Mon, Dec 07, 2015 at 03:13:02PM -0700, Eric Blake wrote:
> On 12/06/2015 10:56 PM, Peter Xu wrote:
> > - patch 8
> > - add "DumpQueryResult" in DUMP_COMPLETED event [Eric]
> > (since DumpQueryResult is introduced in patch 10, so doing it in
> > pa
On Wed, Dec 02, 2015 at 08:51:48PM +0800, Fam Zheng wrote:
> On Wed, 12/02 18:41, Peter Xu wrote:
> > On Wed, Dec 02, 2015 at 05:49:18PM +0800, Fam Zheng wrote:
> > Label "out" is out of the loop. So, when error happens, it sets the
> > errp and directly jump out o
On Wed, Dec 02, 2015 at 09:01:16AM -0700, Eric Blake wrote:
> On 12/02/2015 08:21 AM, Peter Xu wrote:
> > Will the raw memory total size useful in any way? I am totally ok to
> > add this, just failed to find a way for user to use it besides
> > calculating fini
On 11/25/2015 10:46 AM, Fam Zheng wrote:
> On Tue, 11/24 06:49, Eric Blake wrote:
>> On 11/24/2015 04:37 AM, Fam Zheng wrote:
>>
I think the patch should be dropped, and periodic progress reports
should be emitted from within the dump loops that do the heavy lifting.
For the
On 11/24/2015 08:05 PM, Paolo Bonzini wrote:
>
>
> On 24/11/2015 04:10, Fam Zheng wrote:
>> What about all the hot-plug commands that changes the memory layout?
>
> If the guest is stopped, they shouldn't. device_add does not enable new
> BARs for example, the guest does that after it
This patch is only adding the QMP/HMP interface for "dump-query"
command, but not implementing them. This command could be used to
query background dump status. Please refer to the next patch to see
how dump status are defined.
Currently, only fake results are returned.
Signed-off-by
t;IN_PROGRESS", "percentage": "{0..100}%" }
3. no dump is running, and the last dump has finished:
{ "status": "SUCCEEDED|FAILED", "percentage": "N/A" }
It's mostly done. Except that we might need more accurate
"perce
st detached dump, command return immediately. When dump
finished, will receive event DUMP_COMPLETED with a message.
- test dump-query before/during/after dump
- test kdump with zlib compression, w/ and w/o detach
- libvirt
- test "virsh dump --memory-only" with default form
that
might happen when dump got errors within the process (e.g., when
write_dump_header() fails, it will skip calling dump_cleanup(),
which will leads to memory leak for list elements in DumpState).
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.
Hi, all,
Sorry that I forgot to CC reviewers and maintainers when posting the
patch set. :(
Please review!
Thanks.
Peter
On 11/27/2015 10:48 AM, Peter Xu wrote:
> Sorry that this v2 series cannot be aligned with the v1 series. One
> patch is added at the begining of the series to do som
This patch only adds the interfaces, but not implements them.
"detach" parameter is made optional, to make sure that all the old
dump-guest-memory requests will still be able to work.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c | 5 +++--
hmp-commands.hx
To get aligned with QMP interface, one new QMP event DUMP_COMPLETED
is added. It is used when user specified "detach" in dump, and
triggered when the dump finishes. Error message will be appended to
this event if the dump has failed.
Signed-off-by: Peter Xu <pet...@redhat.com&g
By calculating the total_size and written_size of memory, we could
get relatively accurate percentage of finished dump.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dump.c b/dump.c
index 65bd5fb..0fcad28
should make sure each MemoryRegion would
only be referenced for once.
One global struct "GlobalDumpState" is added to store some global
informations for dump procedures. One mutex is used to protect the
global dump info.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c| 36 +---
include/sysemu/dump.h | 9 +
2 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/dump.c b/dump.c
index 25298b7..65bd5fb 100644
--- a/dump.c
+++ b/dump.c
On Fri, Nov 27, 2015 at 11:14:17AM +0100, Paolo Bonzini wrote:
>
>
> On 27/11/2015 07:27, Peter Xu wrote:
> > If embed the mr pointer into GuestPhyBlock, then we might need to
> > ref/unref one MemoryRegion for multiple times (and I am not sure how
> > many, maybe it
On Fri, Nov 27, 2015 at 11:31:00AM +0100, Paolo Bonzini wrote:
>
[snip]
> > +
> > +static GlobalDumpState *dump_state_get_global(void)
> > +{
> > +static bool init = false;
> > +static GlobalDumpState global_dump_state;
> > +if (unlikely(!init)) {
> > +
On Fri, Nov 27, 2015 at 11:17:52AM +0100, Paolo Bonzini wrote:
>
>
> On 27/11/2015 08:03, Peter Xu wrote:
> > > > +{ 'struct': 'DumpStatus',
> > > > + 'data': { 'status': 'str', 'percentage': 'str' } }
> > >
> > > I suggest using enum
On Fri, Nov 27, 2015 at 11:22:48AM +0100, Paolo Bonzini wrote:
>
>
> On 27/11/2015 03:48, Peter Xu wrote:
> > This patch implements the status changes inside dump process. When
> > query dump status, three possible results could be:
> >
> > 1. never started d
On 11/27/2015 01:14 PM, Fam Zheng wrote:
> On Fri, 11/27 10:48, Peter Xu wrote:
>> This patch implements "detach" for "dump-guest-memory" command. When
>> specified, one background thread is created to do the dump work.
>>
>> When there is a
On 11/27/2015 01:19 PM, Fam Zheng wrote:
> On Fri, 11/27 10:48, Peter Xu wrote:
>> @@ -1659,8 +1660,17 @@ static void dump_process(DumpState *s, Error **errp)
>> static void *dump_thread(void *data)
>> {
>> GlobalDumpState *global = (GlobalDumpState *)data;
On 11/27/2015 12:28 PM, Fam Zheng wrote:
> I think when write_dump_header() returns a failure, it does call
> dump_cleanup(), in create_header{32,64}.
>
> But the changes of code in this patch look sane to me, and the new error
> handling is definitely looking better.
Yes, you are right. I
On 11/27/2015 12:31 PM, Fam Zheng wrote:
> On Fri, 11/27 10:48, Peter Xu wrote:
>> This patch only adds the interfaces, but not implements them.
>> "detach" parameter is made optional, to make sure that all the old
>> dump-guest-memory requests will still be
On 11/27/2015 01:28 PM, Fam Zheng wrote:
> Looks good overall! I've replied patches with a few questions. Thanks!
>
> Fam
Thanks! Will wait for more comments and post v3 later.
Peter
On 11/27/2015 01:25 PM, Fam Zheng wrote:
> On Fri, 11/27 10:48, Peter Xu wrote:
>> This patch is only adding the QMP/HMP interface for "dump-query"
>> command, but not implementing them. This command could be used to
>> query background dump status. Please refer
On Fri, Nov 27, 2015 at 11:15:35AM +0100, Paolo Bonzini wrote:
>
>
> On 27/11/2015 03:48, Peter Xu wrote:
> > +##
> > +# @DUMP_COMPLETED
> > +#
> > +# Emitted when background dump has completed
> > +#
> > +# Since: 2.6
> > +##
> > +{
On Fri, Nov 27, 2015 at 01:14:25PM +0800, Fam Zheng wrote:
> On Fri, 11/27 10:48, Peter Xu wrote:
[snip]
>
> This patch doesn't handle the incoming migration case, i.e. when QEMU is
> started with "-incoming", or "-incoming defer". Dump can go wrong when
On Mon, Nov 30, 2015 at 10:12:10AM +0100, Paolo Bonzini wrote:
>
>
> On 30/11/2015 04:47, Peter Xu wrote:
> >
> > I met one problem when trying to add a new public function in dump.h
> > named "dump_state_get_global" and using it in hmp.c.
>
> Do
On Mon, Nov 30, 2015 at 10:28:08AM +0100, Markus Armbruster wrote:
> Paolo Bonzini <pbonz...@redhat.com> writes:
>
> > On 30/11/2015 04:47, Peter Xu wrote:
> >>
> >> I met one problem when trying to add a new public function in dump.h
> >> named
Hi, all,
I met one problem when trying to add a new public function in dump.h
named "dump_state_get_global" and using it in hmp.c. What I got is
something like:
In file included from /root/git/qemu/hmp.c:35:0:
/root/git/qemu/include/sysemu/dump.h:26:34: error: attempt to use poisoned
On Mon, Nov 30, 2015 at 11:18:48AM -0700, Eric Blake wrote:
> On 11/26/2015 07:48 PM, Peter Xu wrote:
> > To get aligned with QMP interface, one new QMP event DUMP_COMPLETED
> > is added. It is used when user specified "detach" in dump, and
> > triggered when t
On Mon, Nov 30, 2015 at 03:05:10PM -0700, Eric Blake wrote:
> On 11/30/2015 04:32 AM, Peter Xu wrote:
> > This patch only adds the interfaces, but not implements them.
> > "detach" parameter is made optional, to make sure that all the old
> > dump-guest-memory requ
On Mon, Nov 30, 2015 at 03:08:24PM -0700, Eric Blake wrote:
> On 11/30/2015 04:32 AM, Peter Xu wrote:
> > Instead of malloc/free each time for DumpState, make it
> > static. Added DumpStatus to show status for dump.
> >
> > This is to be used for detach d
On Mon, Nov 30, 2015 at 03:12:31PM -0700, Eric Blake wrote:
> On 11/30/2015 04:32 AM, Peter Xu wrote:
> > +Example:
> > +
> > +{ "event": "DUMP_COMPLETED",
> > + "data": {} }
>
> Please keep this file sorted. The insertion s
On Mon, Nov 30, 2015 at 11:21:23AM -0700, Eric Blake wrote:
> On 11/26/2015 07:48 PM, Peter Xu wrote:
> > This patch only adds the interfaces, but not implements them.
>
> s/not implements/does not implement/
>
> > "detach" parameter is made optional, to make su
On Mon, Nov 30, 2015 at 02:00:28PM +0100, Paolo Bonzini wrote:
> > +/* init dump state with specific status */
> > +static void dump_state_prepare(DumpState *s, DumpStatus status)
> > +{
> > +bzero(s, sizeof(*s));
> > +s->status = status;
>
> Either use memcpy, or
>
> s = (DumpState)
On Mon, Nov 30, 2015 at 01:55:01PM +0100, Paolo Bonzini wrote:
>
>
> On 30/11/2015 12:32, Peter Xu wrote:
> > if (*errp) {
> > s->status = DUMP_STATUS_FAILED;
>
> Why not move this "if" to dump_process as well?
Yes. I did that in another pa
On Mon, Nov 30, 2015 at 11:27:35AM -0700, Eric Blake wrote:
> On 11/26/2015 07:48 PM, Peter Xu wrote:
> > This patch is only adding the QMP/HMP interface for "dump-query"
> > command, but not implementing them. This command could be used to
> > query backg
On Mon, Nov 30, 2015 at 03:22:37PM -0700, Eric Blake wrote:
> On 11/30/2015 04:32 AM, Peter Xu wrote:
> > Add more documents to mention about "query-dump" and DUMP_COMPLETED
> > events.
> >
> > Signed-off-by: Peter Xu <pet...@redhat.com>
> &g
On Mon, Nov 30, 2015 at 03:17:01PM -0700, Eric Blake wrote:
> On 11/30/2015 04:32 AM, Peter Xu wrote:
> > +DumpQueryResult *qmp_query_dump(Error **errp)
> > +{
> > +DumpQueryResult *result = g_malloc0(sizeof(*result));
>
> Might be nicer as g_new0(DumpQuery
On Mon, Nov 30, 2015 at 01:56:42PM +0100, Paolo Bonzini wrote:
>
>
> On 30/11/2015 12:32, Peter Xu wrote:
> > +{
> > +DumpQueryResult *result = g_malloc0(sizeof(*result));
> > +DumpState *state = dump_state_get_global();
> > +result->sta
This patch only adds the interfaces, but not implements them.
"detach" parameter is made optional, to make sure that all the old
dump-guest-memory requests will still be able to work.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c | 5 +++--
hmp-commands.hx
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dump.c b/dump.c
index c8ae5c3..5b9def3 100644
--- a/dump.c
+++ b/dump.c
@@ -1628,13 +1628,17 @@ void qmp_dump_guest_memory(bool paging, const char
*file,
Dum
It will calculate percentage of finished work from written_bytes and
total_bytes.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
hmp-commands-info.hx | 14 ++
hmp.c| 18 ++
hmp.h| 1 +
3 files changed, 33 insertions(+)
diff
On Mon, Nov 30, 2015 at 11:36:41AM +0100, Paolo Bonzini wrote:
>
>
> On 30/11/2015 10:47, Peter Xu wrote:
> > So from what I understand from your reply, I could include the
> > percentage value into "query-dump", right? :)
>
> If you have the written and
ommand return immediately. When dump
finished, will receive event DUMP_COMPLETED with a message.
- test query-dump before/during/after dump
- test kdump with zlib compression, w/ and w/o detach
- libvirt
- test "virsh dump --memory-only" with default format and
kdump-zlib f
It might be a little bit confusing to do dump_cleanup() in these two
functions and error prone. A better way is to do dump_cleanup()
before dump finish, no matter whether dump has succeeded or not.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.
No functional change. Cleanup only.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c| 19 ++-
include/sysemu/dump.h | 3 +++
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/dump.c b/dump.c
index 110dbf9..c8ae5c3 100644
--- a/dump.c
One new QMP event DUMP_COMPLETED is added. It is used when user
specified "detach" in dump, and triggered when the dump finishes
(either succeeded or failed). If failed, one "err" data will be
passed with specific error message.
Signed-off-by: Peter Xu <pet...@redhat.com>
For now, it has no effect. It will be used in dump detach support.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c| 13 +
include/qemu-common.h | 4
qmp.c | 14 ++
3 files changed, 31 insertions(+)
diff --git a/dump.c b/
Instead of malloc/free each time for DumpState, make it
static. Added DumpStatus to show status for dump.
This is to be used for detach dump.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c| 30 +++---
include/sysemu/dump.h | 2 ++
If "detach" is provided, one thread is created to do the dump work,
while main thread will return immediately. For each GuestPhysBlock,
adding one more field "mr" to points to MemoryRegion that it
belongs, also ref the mr before use.
Signed-off-by: Peter Xu <pet...@
Add more documents to mention about "query-dump" and DUMP_COMPLETED
events.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
qapi-schema.json | 7 +--
qmp-commands.hx | 4 +++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.js
atest dump
>From written_bytes and total_bytes, we could see how much work
finished by calculating:
100.0 * written_bytes / total_bytes (%)
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c | 10 ++
qapi-schema.json | 29 +
qm
Here, total_size is the size in bytes to be dumped (raw data, which
means before compression), while written_size are bytes handled (raw
size too).
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c| 32
include/sysemu/dump.h | 9 ++
On Mon, Nov 30, 2015 at 09:06:45AM +0100, Markus Armbruster wrote:
> Peter Xu <pet...@redhat.com> writes:
>
> > Hi, all,
> >
> > I met one problem when trying to add a new public function in dump.h
> > named "dump_state_get_global" and using
On Tue, Dec 01, 2015 at 10:54:48AM +0100, Paolo Bonzini wrote:
>
>
> On 01/12/2015 04:57, Peter Xu wrote:
> >> > You need a mutex around the reads of ->status and ->written_size.
> > Could I avoid using mutex here? Let me try to explain what I
> > thought.
On Tue, Dec 01, 2015 at 01:37:37PM +0100, Paolo Bonzini wrote:
> atomic_mb_{read,set} does order accesses to the variable against
> all other accesses. In this case I'd prefer it to smp_wmb/rmb, because
> the writes to written_size are far from the writes to status.
Yes... It should be again
On Tue, Dec 01, 2015 at 01:47:08PM +0100, Paolo Bonzini wrote:
>
>
> On 01/12/2015 13:45, Peter Xu wrote:
> >> > It's a matter of taste though. What you wrote above is certainly okay
> >> > as well.
> > Thanks for the explanation. Then I will choose
This patch only adds the interfaces, but does not implement them.
"detach" parameter is made optional, to make sure that all the old
dump-guest-memory requests will still be able to work.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c | 5 +++--
hmp-
[Paolo]
Test Done:
- QMP & HMP
- test default dump (sync), work as usual
- test detached dump, command return immediately.
- When dump finished, will receive event DUMP_COMPLETED.
- test query-dump before/during/after dump
- test kdump with zlib compression, w/ and w/o detach
- lib
ump
>From completed and total, we could know how much work
finished by calculating:
100.0 * completed / total (%)
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c | 23 +--
qapi-schema.json | 34 --
qm
It will calculate percentage of finished work from completed and
total.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
hmp-commands-info.hx | 14 ++
hmp.c| 18 ++
hmp.h| 1 +
3 files changed, 33 insertions(+)
diff --git
It might be a little bit confusing to do dump_cleanup() in these two
functions and error prone. A better way is to do dump_cleanup()
before dump finish, no matter whether dump has succeeded or not.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dump.c b/dump.c
index e46749d..65d1f7e 100644
--- a/dump.c
+++ b/dump.c
@@ -1626,13 +1626,17 @@ void qmp_dump_guest_memory(bool paging, const char
*file,
Dum
For now, it has no effect. It will be used in dump detach support.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
dump.c| 13 +
include/qemu-common.h | 4
qmp.c | 14 ++
3 files changed, 31 insertions(+)
diff --git a/dump.c b/
1 - 100 of 7722 matches
Mail list logo