From: Avi Kivity <avi@redhat.com>
To: Orit Wasserman <owasserm@redhat.com>
Cc: blauwirbel@gmail.com, stefanha@gmail.com, aliguori@us.ibm.com,
qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH v8 09/10] Add set_cachesize command
Date: Thu, 05 Apr 2012 15:15:52 +0300 [thread overview]
Message-ID: <4F7D8CF8.7040108@redhat.com> (raw)
In-Reply-To: <1333622879-12055-10-git-send-email-owasserm@redhat.com>
On 04/05/2012 01:47 PM, Orit Wasserman wrote:
> Change XBZRLE cache size in MB (the size should be a power of 2).
In bytes
>
> +void xbzrle_cache_resize(int64_t new_size)
> +{
> + if (page_cache) {
> + cache_fini();
> + cache_init(new_size);
> + }
> +}
A little sad to drop the cache, especially if we're enlarging it. But
this can be improved later.
> +
> +ETEXI
> +
> + {
> + .name = "migrate_set_cachesize",
> + .args_type = "value:o",
> + .params = "value",
> + .help = "set cache size (in MB) for XBZRLE migrations",
In bytes.
> + .mhandler.cmd = hmp_migrate_set_cachesize,
> + },
> +
> +STEXI
> +@item migrate_set_cachesize @var{value}
> +@findex migrate_set_cache
> +Set cache size to @var{value} (in MB) for xbzrle migrations.
Need to document the constraints, and say something about how a larger
cache size can reduce the needed bandwidth.
We need to either document the default or (better) add a command to get
the current cache size (perhaps with some statistics about hit rate and
average data reduction).
>
> +void qmp_migrate_set_cachesize(int64_t value, Error **errp)
> +{
> + MigrationState *s;
> +
> + /* On 32-bit hosts, QEMU is limited by virtual address space */
> + if (value > (2047 << 20) && HOST_LONG_BITS == 32) {
Could be made clearer by using
/* Check for truncation */
if (value != (size_t)value)) {
...
(assumes value is in bytes)
> ##
> +# @migrate_set_cachesize
> +#
> +# Set XBZRLE cache size
> +#
> +# @value: cache size in bytes
Here it's in bytes, good.
For the human monitor we can use MB as the unit, or allow suffixes as we
do for -m <memory>.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-04-05 12:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-05 10:47 [Qemu-devel] [PATCH v8 00/10] XBZRLE delta for live migration of large memory app Orit Wasserman
2012-04-05 10:47 ` [Qemu-devel] [PATCH v8 01/10] Add cache handling functions Orit Wasserman
2012-04-05 10:47 ` [Qemu-devel] [PATCH v8 02/10] Add uleb encoding/decoding functions Orit Wasserman
2012-04-05 10:47 ` [Qemu-devel] [PATCH v8 03/10] Add save_block_hdr function Orit Wasserman
2012-04-05 10:47 ` [Qemu-devel] [PATCH v8 04/10] Add host_from_stream_offset_versioned function Orit Wasserman
2012-04-05 10:47 ` [Qemu-devel] [PATCH v8 05/10] Add MigrationParams structure Orit Wasserman
2012-04-05 10:47 ` [Qemu-devel] [PATCH v8 06/10] Add XBZRLE to ram_save_block and ram_save_live Orit Wasserman
2012-04-05 10:47 ` [Qemu-devel] [PATCH v8 07/10] Add XBZRLE option to migrate command Orit Wasserman
2012-04-05 10:47 ` [Qemu-devel] [PATCH v8 08/10] Add migration capabilites Orit Wasserman
2012-04-05 10:47 ` [Qemu-devel] [PATCH v8 09/10] Add set_cachesize command Orit Wasserman
2012-04-05 12:15 ` Avi Kivity [this message]
2012-04-05 12:17 ` Avi Kivity
2012-04-05 10:47 ` [Qemu-devel] [PATCH v8 10/10] Add XBZRLE statstics information Orit Wasserman
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=4F7D8CF8.7040108@redhat.com \
--to=avi@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=owasserm@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanha@gmail.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 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.