From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org
Cc: joel.schopp@amd.com, stefanb@linux.vnet.ibm.com,
quintela@redhat.com, arei.gonglei@huawei.com,
sanidhya.iiith@gmail.com
Subject: [Qemu-devel] [PATCH v5 0/2] In memory QEMUFile
Date: Mon, 29 Sep 2014 10:41:33 +0100 [thread overview]
Message-ID: <1411983695-7910-1-git-send-email-dgilbert@redhat.com> (raw)
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
This patch-pair adds the QEMUSizedBuffer based in-memory QEMUFile
written by Stefan Berger and Joel Schopp. I've made some
fixes and modified the existing test-vmstate to use it for some test cases.
While there's nothing other than test cases using it yet, I think
it's worth going in by itself, since I'm using it in two separate
patchsets (postcopy and visitor/BER) and Sanidhya uses it in
the periodic vmstate test world. In addition both microcheckpointing and
COLO have similar but independent implementations (although they both
have some extra-gotcha's so it might not be possible to reuse it), and
there was another implementation of the same thing in the Yabusame Postcopy
world. Thus it seems best to put in, if only to stop people writing yet
another implementation.
Dave
v5:
Fixes from Eric's comments; including a memory leak in an error path
v4:
Fix very silly mistake in qsb_grow ENOMEM check
v3:
Mostly addressing comments from Eric and Gonglei
rewrote qsb_grow to always use _try_ for memory allocation
also made it use MAX_CHUNK_SIZE as needed
made QSB_MAX_CHUNK_SIZE 16x rather than 10x CHUNK_SIZE
reworked qsb_get_buffer to always take an allocated buffer
qsb_create:
Cope with 0 length but passed buffer
Rework so it can fail on memory allocation failures
qsb_write_at
return -EINVAL for invalid position
qsb_clone
Cope with qsb_write_at failing
Typo: 'of of' in comment
'withing'
Reword qsb_clone 'exact copy'->'deep copy'
Dr. David Alan Gilbert (2):
QEMUSizedBuffer based QEMUFile
Tests: QEMUSizedBuffer/QEMUBuffer
include/migration/qemu-file.h | 28 +++
include/qemu/typedefs.h | 1 +
qemu-file.c | 456 ++++++++++++++++++++++++++++++++++++++++++
tests/Makefile | 2 +-
tests/test-vmstate.c | 74 +++----
5 files changed, 524 insertions(+), 37 deletions(-)
--
1.9.3
next reply other threads:[~2014-09-29 9:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-29 9:41 Dr. David Alan Gilbert (git) [this message]
2014-09-29 9:41 ` [Qemu-devel] [PATCH v5 1/2] QEMUSizedBuffer based QEMUFile Dr. David Alan Gilbert (git)
2014-10-08 2:52 ` zhanghailiang
2014-10-08 8:23 ` Dr. David Alan Gilbert
2014-10-08 8:34 ` Markus Armbruster
2014-10-08 9:08 ` Dr. David Alan Gilbert
2014-10-08 9:29 ` zhanghailiang
2014-09-29 9:41 ` [Qemu-devel] [PATCH v5 2/2] Tests: QEMUSizedBuffer/QEMUBuffer Dr. David Alan Gilbert (git)
2014-09-29 14:42 ` [Qemu-devel] [PATCH v5 0/2] In memory QEMUFile Eric Blake
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=1411983695-7910-1-git-send-email-dgilbert@redhat.com \
--to=dgilbert@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=joel.schopp@amd.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=sanidhya.iiith@gmail.com \
--cc=stefanb@linux.vnet.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).