Re: [Qemu-devel] [PATCH 6/6] qmp: add balloon-get-memory-stats & event

2012-02-09 Thread Adam Litke
@ typedef enum MonitorEvent { > QEVENT_SPICE_DISCONNECTED, > QEVENT_BLOCK_JOB_COMPLETED, > QEVENT_BLOCK_JOB_CANCELLED, > +QEVENT_BALLOON_STATS, > QEVENT_MAX, > } MonitorEvent; > > diff --git a/qapi-schema.json b/qapi-schema.json > index 24a42e3..c4d8d0c 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -1563,3 +1563,24 @@ > { 'command': 'qom-list-types', >'data': { '*implements': 'str', '*abstract': 'bool' }, >'returns': [ 'ObjectTypeInfo' ] } > + > +## > +# @balloon-get-memory-stats > +# > +# Ask the guest's balloon driver for guest memory statistics. > +# > +# This command will only get the process started and will return immediately. > +# The BALLOON_MEMORY_STATS event will be emitted when the statistics > +# information is returned by the guest. > +# > +# Returns: nothing on success > +# If the balloon driver is enabled but not functional because the > KVM > +# kernel module cannot support it, KvmMissingCap > +# If no balloon device is present, DeviceNotActive > +# > +# Notes: There's no guarantees the guest will ever respond, thus the > +#BALLOON_MEMORY_STATS event may never be emitted. > +# > +# Since: 1.1 > +## > +{ 'command': 'balloon-get-memory-stats' } > diff --git a/qmp-commands.hx b/qmp-commands.hx > index b5e2ab8..52c1fc3 100644 > --- a/qmp-commands.hx > +++ b/qmp-commands.hx > @@ -2047,3 +2047,8 @@ EQMP > .args_type = "implements:s?,abstract:b?", > .mhandler.cmd_new = qmp_marshal_input_qom_list_types, > }, > +{ > +.name = "balloon-get-memory-stats", > +.args_type = "", > +.mhandler.cmd_new = qmp_marshal_input_balloon_get_memory_stats, > +}, > -- > 1.7.9.111.gf3fb0.dirty > -- Adam Litke IBM Linux Technology Center

Re: [Qemu-devel] [RFC 0/5]: QMP: add balloon-get-memory-stats command

2012-01-19 Thread Adam Litke
equested and only if that was set would we raise the event. Without this, the guest can spam the host with an unlimited number of bogus events. Tested-by: Adam Litke -- Adam Litke IBM Linux Technology Center

Re: [Qemu-devel] [PATCH] build: Cleanup qga make output

2011-12-13 Thread Adam Litke
On Tue, Dec 13, 2011 at 10:23:18AM -0200, Luiz Capitulino wrote: > On Mon, 12 Dec 2011 17:38:36 -0600 > Michael Roth wrote: > > > On 12/12/2011 05:03 PM, Anthony Liguori wrote: > > > On 12/07/2011 10:33 AM, Adam Litke wrote: > > >> Currently the make

Re: [Qemu-devel] [libvirt] virDomainBlockJobAbort and block_job_cancel

2011-12-08 Thread Adam Litke
On Wed, Dec 07, 2011 at 04:01:58PM -0700, Eric Blake wrote: > On 12/07/2011 03:35 PM, Adam Litke wrote: > > Stefan's qemu tree has a block_job_cancel command that always acts > > asynchronously. In order to provide the synchronous behavior in libvirt > > (when > >

Re: [Qemu-devel] [libvirt] virDomainBlockJobAbort and block_job_cancel

2011-12-07 Thread Adam Litke
because I need to poll and sleep. 3) Ask Stefan to provide a synchronous mode for the qemu monitor command This one is the nicest from a libvirt perspective, but I doubt qemu wants to add such an interface given that it basically has broken semantics as far as qemu is concerned. If this is all too nasty, we could probably just change the behavior of blockJobAbort and make it always synchronous with a 'cancelled' event. Thoughts? -- Adam Litke IBM Linux Technology Center

[Qemu-devel] [PATCH] build: Cleanup qga make output

2011-12-07 Thread Adam Litke
Signed-off-by: Adam Litke --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 301c75e..7c93739 100644 --- a/Makefile +++ b/Makefile @@ -168,7 +168,7 @@ check-qjson: check-qjson.o $(qobject-obj-y) $(tools-obj-y) test-coroutine: test

Re: [Qemu-devel] wiki summary

2011-11-18 Thread Adam Litke
is updated on the host. > > > > > >- I understand the motivation of being able to do everything on the > > >guest > > > > > > (exe) but we need to keep in mind it's various guest OSs, and it > > > means that there sho

Re: [Qemu-devel] converging around a single guest agent

2011-11-17 Thread Adam Litke
ll > > designed exec API that returns command exit codes and (optionally) command > > output. We could also formalize the install of additional components into > > some sort of plugin interface. These are all relatively easy problems to

Re: [Qemu-devel] converging around a single guest agent

2011-11-16 Thread Adam Litke
enough, they can always be promoted to first-order API calls in future versions of the API. What are your thoughts on this approach? -- Adam Litke IBM Linux Technology Center

Re: [Qemu-devel] [PATCH 0/4] Image Streaming API

2011-08-30 Thread Adam Litke
On Tue, Aug 30, 2011 at 10:28:09AM +0100, Stefan Hajnoczi wrote: > On Tue, Aug 30, 2011 at 4:19 AM, Zhi Yong Wu wrote: > > On Tue, Aug 23, 2011 at 8:58 PM, Stefan Hajnoczi > > wrote: > >> These patches put in place the image streaming QMP/HMP commands and > >> documentation.  Image streaming itse

Re: [Qemu-devel] [PATCH 1/4] qmp: add block_stream command

2011-08-23 Thread Adam Litke
Under libvirt, I get the following error when trying to start a block stream: qerror: bad call in function 'do_block_stream': qerror: -> error format '{ 'class': 'NotSupported', 'data': {} }' not found qerror: call at blockdev.c:808 2011-08-23 11:30:09.974: shutting down Is this patch missing a p

Re: [Qemu-devel] [PATCH 4/4] qmp: add query-block-jobs

2011-08-23 Thread Adam Litke
On Tue, 2011-08-23 at 13:58 +0100, Stefan Hajnoczi wrote: > diff --git a/blockdev.c b/blockdev.c > index 036b7eb..e9098f6 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -835,3 +835,13 @@ int do_block_job_cancel(Monitor *mon, const QDict > *params, QObject **ret_data) > qerror_report(QERR_D

Re: [Qemu-devel] [libvirt] [PATCH] qemu: Get memory balloon info correctly for text monitor

2011-08-15 Thread Adam Litke
On 08/15/2011 11:50 AM, Daniel P. Berrange wrote: > On Mon, Aug 15, 2011 at 11:27:43AM -0500, Adam Litke wrote: >> On 08/15/2011 08:23 AM, Osier Yang wrote: >>> 于 2011年08月15日 21:58, Osier Yang 写道: >>>> * src/qemu/qemu_monitor_text.c: BALLOON_PREFIX was defined as

Re: [Qemu-devel] live block copy/stream/snapshot discussion

2011-07-12 Thread Adam Litke
on interface? > Adam: Is there a libvirt requirement for iteration or could we support > background copy only? There is no hard requirement for iteration in libvirt. However, I think there is a requirement that we report some sort of progress to an end user. These operations can easily take many minutes (even hours) and such a long-running operation needs to report progress. I think the current information returned by 'query-block-stream' is appropriate for this purpose and should definitely be maintained. -- Adam Litke IBM Linux Technology Center

[Qemu-devel] Re: [RFC][PATCH v7 06/16] virtagent: transport definitions

2011-03-07 Thread Adam Litke
On Mon, 2011-03-07 at 14:10 -0600, Michael Roth wrote: > +#define VA_LINE_LEN_MAX 1024 > +static void va_rpc_parse_hdr(VAHTState *s) > +{ > +int i, line_pos = 0; > +bool first_line = true; > +char line_buf[VA_LINE_LEN_MAX]; > + > +TRACE("called"); > + > +for (i = 0; i < VA_HDR_L

[Qemu-devel] Re: [RFC][PATCH v7 04/16] virtagent: bi-directional RPC handling logic

2011-03-07 Thread Adam Litke
On Mon, 2011-03-07 at 14:10 -0600, Michael Roth wrote: > This implements the state machine/logic used to manage > send/receive/execute phases of RPCs we send or receive. It does so using > a set of abstract methods we implement with the application and > transport level code which will follow. > >

[Qemu-devel] Re: [PATCH 1/2] Add virtagent file system freeze/thaw

2011-02-01 Thread Adam Litke
On Tue, 2011-02-01 at 11:58 +0100, jes.soren...@redhat.com wrote: > +/* > + * va_fsfreeze(): Walk list of mounted file systems in the guest, and > + * freeze the ones which are real local file systems. > + * rpc return values: Number of file systems frozen, -1 on error. > + */ > +static xmlrpc_va

Re: spice vdagent protocol, was Re: [Qemu-devel] KVM call minutes for Jan 11

2011-01-13 Thread Adam Litke
On Thu, 2011-01-13 at 21:18 +0200, Alon Levy wrote: > On Thu, Jan 13, 2011 at 09:01:34AM -0600, Adam Litke wrote: > > On Tue, 2011-01-11 at 20:33 +0200, Alon Levy wrote: > > > > Spice guest agent: > > > > - virt agent, matahari, spice agent...what is in spice a

Re: spice vdagent protocol, was Re: [Qemu-devel] KVM call minutes for Jan 11

2011-01-13 Thread Adam Litke
On Tue, 2011-01-11 at 20:33 +0200, Alon Levy wrote: > > Spice guest agent: > > - virt agent, matahari, spice agent...what is in spice agent? > > - spice char device > > - mouse, copy 'n paste, screen resolution change > > - could be generic (at least input and copy/paste) > > - send protocol de

Re: [Qemu-devel] [Qestion] What status of memory stats feature

2010-12-15 Thread Adam Litke
On Wed, 2010-12-15 at 15:39 -0200, Luiz Capitulino wrote: > On Wed, 15 Dec 2010 16:20:05 +0900 > "Ken'ichi Ohmichi" wrote: > > > > > Hi, > > > > I tried to get the memory stats by using virDomainMemoryStats() of libvirt, > > but it could not do it because of the following patch: > > > > [PATCH

[Qemu-devel] Re: [RFC][PATCH v5 07/21] virtagent: add va.getfile RPC

2010-12-09 Thread Adam Litke
On Wed, 2010-12-08 at 20:19 +0100, Jes Sorensen wrote: > On 12/07/10 17:00, Adam Litke wrote: > > Hi Jes, you raise some good points and pitfalls with the current getfile > > approach. I've been thinking about an alternative and am wondering what > > you (and others) t

[Qemu-devel] Re: [RFC][PATCH v5 07/21] virtagent: add va.getfile RPC

2010-12-07 Thread Adam Litke
Hi Jes, you raise some good points and pitfalls with the current getfile approach. I've been thinking about an alternative and am wondering what you (and others) think... First off, I think we should switch to a copyfile() API that allows us to avoid presenting the file contents to the user. Nei

[Qemu-devel] Re: [RFC][PATCH v5 19/21] virtagent: add virtagent guest daemon

2010-12-06 Thread Adam Litke
On Fri, 2010-12-03 at 12:03 -0600, Michael Roth wrote: > +static void usage(const char *cmd) > +{ > +printf( > +"Usage: %s -c \n" > +"QEMU virtagent guest agent\n" > +"\n" > +" -c, --channel channel options of the form:\n" > +"::[:channel_id]\n" > +" -v, --verbose

[Qemu-devel] Re: [RFC][PATCH v5 09/21] virtagent: add va.getdmesg RPC

2010-12-06 Thread Adam Litke
On Fri, 2010-12-03 at 12:03 -0600, Michael Roth wrote: > +/* va_getdmesg(): return dmesg output > + * rpc return values: > + * - dmesg output as a string > + */ > +static xmlrpc_value *va_getdmesg(xmlrpc_env *env, > + xmlrpc_value *param, > +

[Qemu-devel] Re: [RFC][PATCH v5 04/21] virtagent: transport definitions and job callbacks

2010-12-06 Thread Adam Litke
On Fri, 2010-12-03 at 12:03 -0600, Michael Roth wrote: > +static void va_http_send_handler(void *opaque) > +{ > +VAHTState *s = &va_state->send_state; > +enum va_http_status http_status; > +int fd = va_state->fd; > +int ret; > + > +TRACE("called, fd: %d", fd); > + > +switch

[Qemu-devel] Re: [RFC][PATCH v5 08/21] virtagent: add agent_viewfile qmp/hmp command

2010-12-06 Thread Adam Litke
On Fri, 2010-12-03 at 12:03 -0600, Michael Roth wrote: > Utilize the getfile RPC to provide a means to view text files in the > guest. Getfile can handle binary files as well but we don't advertise > that here due to the special handling requiring to store it and provide > it back to the user (base

[Qemu-devel] Re: [RFC][PATCH v5 07/21] virtagent: add va.getfile RPC

2010-12-06 Thread Adam Litke
On Fri, 2010-12-03 at 12:03 -0600, Michael Roth wrote: > Add RPC to retrieve a guest file. This interface is intended > for smaller reads like peeking at logs and /proc and such. > > Signed-off-by: Michael Roth > --- > virtagent-server.c | 59 >

[Qemu-devel] Re: [RFC][PATCH v5 03/21] virtagent: common code for managing client/server rpc jobs

2010-12-06 Thread Adam Litke
On Fri, 2010-12-03 at 12:03 -0600, Michael Roth wrote: > +/* create new client job and then put it on the queue. this can be > + * called externally from virtagent. Since there can only be one virtagent > + * instance we access state via an object-scoped global rather than pass > + * it around. >

[Qemu-devel] Re: [RFC][PATCH v5 03/21] virtagent: common code for managing client/server rpc jobs

2010-12-06 Thread Adam Litke
On Fri, 2010-12-03 at 12:03 -0600, Michael Roth wrote: > +/* create new client job and then put it on the queue. this can be > + * called externally from virtagent. Since there can only be one virtagent > + * instance we access state via an object-scoped global rather than pass > + * it around. > +

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 02/15] virtproxy: qemu-vp, standalone daemon skeleton

2010-11-05 Thread Adam Litke
On Thu, 2010-11-04 at 08:57 -0500, Michael Roth wrote: > > This resembles vl.c's main_loop_wait() but I can see why you might want > > your own. There is opportunity for sharing the select logic and ioh > > callbacks but I think that could be addressed later. > > > > Yup these are all basically c

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 09/15] virtproxy: add handler for data packets

2010-11-03 Thread Adam Litke
On Wed, 2010-11-03 at 10:28 -0500, Michael Roth wrote: > Process VPPackets coming in from channel and send them to the > appropriate server/client connections. > > Signed-off-by: Michael Roth > --- > virtproxy.c | 42 ++ > 1 files changed, 42 insertions

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 05/15] virtproxy: add accept handler for communication channel

2010-11-03 Thread Adam Litke
On Wed, 2010-11-03 at 10:28 -0500, Michael Roth wrote: > This accept()'s connections to the socket we told virt-proxy to listen > for the channel connection on and sets the appropriate read handler for > the resulting FD. > > Signed-off-by: Michael Roth > --- > virtproxy.c | 37 +++

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 07/15] virtproxy: add vp_new() VPDriver constructor

2010-11-03 Thread Adam Litke
Be more descriptive here please. On Wed, 2010-11-03 at 10:28 -0500, Michael Roth wrote: > Signed-off-by: Michael Roth > --- > virtproxy.c | 23 +++ > virtproxy.h |3 +++ > 2 files changed, 26 insertions(+), 0 deletions(-) > > diff --git a/virtproxy.c b/virtproxy.c > in

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 01/15] virtproxy: base data structures and constants

2010-11-03 Thread Adam Litke
On Wed, 2010-11-03 at 10:27 -0500, Michael Roth wrote: > +static QemuOptsList vp_socket_opts = { > +.name = "vp_socket_opts", > +.head = QTAILQ_HEAD_INITIALIZER(vp_socket_opts.head), > +.desc = { > +{ > +.name = "path", > +.type = QEMU_OPT_STRING, > +

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 02/15] virtproxy: qemu-vp, standalone daemon skeleton

2010-11-03 Thread Adam Litke
On Wed, 2010-11-03 at 10:27 -0500, Michael Roth wrote: > +/* mirror qemu I/O-related code for standalone daemon */ > +typedef struct IOHandlerRecord { > +int fd; > +IOCanReadHandler *fd_read_poll; > +IOHandler *fd_read; > +IOHandler *fd_write; > +int deleted; > +void *opaque

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 06/15] virtproxy: add read handler for communication channel

2010-11-03 Thread Adam Litke
On Wed, 2010-11-03 at 10:28 -0500, Michael Roth wrote: > Handle data coming in over the channel as VPPackets: Process control > messages and forward data from remote client/server connections to the > appropriate server/client FD on our end. > > Signed-off-by: Michael Roth > --- > virtproxy.c |

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 03/15] virtproxy: add debug functions for virtproxy core

2010-11-03 Thread Adam Litke
Alas, this code exists in several other places too... I guess you can't be responsible for cleaning up all of qemu :) On Wed, 2010-11-03 at 10:27 -0500, Michael Roth wrote: > Signed-off-by: Michael Roth > --- > virtproxy.c | 17 + > 1 files changed, 17 insertions(+), 0 deletion

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 00/15] virtproxy: host/guest communication layer

2010-11-03 Thread Adam Litke
You've got a lot of "objects" interacting with one another in virtproxy. I think it would help other reviewers if you could describe the relationships between the entities such as: VPDriver, VPConn, VPChannel, VPIForward, VPOForward, etc. This patch series is really wiring a lot of things together

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 04/15] virtproxy: list look-up functions conns/oforwards/iforwards

2010-11-03 Thread Adam Litke
You should describe your changes a little bit more on the top here. Looks good otherwise. On Wed, 2010-11-03 at 10:27 -0500, Michael Roth wrote: > Signed-off-by: Michael Roth > --- > virtproxy.c | 44 > 1 files changed, 44 insertions(+), 0 deletions

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 12/15] virtproxy: interfaces to set/remove VPIForwards

2010-11-03 Thread Adam Litke
Description please. On Wed, 2010-11-03 at 10:28 -0500, Michael Roth wrote: > Signed-off-by: Michael Roth > --- > virtproxy.c | 59 > +++ > virtproxy.h |2 ++ > 2 files changed, 61 insertions(+), 0 deletions(-) > > diff --git a/virtp

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 09/15] virtproxy: add handler for data packets

2010-11-03 Thread Adam Litke
On Wed, 2010-11-03 at 10:28 -0500, Michael Roth wrote: > Process VPPackets coming in from channel and send them to the > appropriate server/client connections. > > Signed-off-by: Michael Roth > --- > virtproxy.c | 42 ++ > 1 files changed, 42 insertions(

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 11/15] virtproxy: add vp_handle_packet()

2010-11-03 Thread Adam Litke
Description please. On Wed, 2010-11-03 at 10:28 -0500, Michael Roth wrote: > Signed-off-by: Michael Roth > --- > virtproxy.c | 23 +++ > 1 files changed, 23 insertions(+), 0 deletions(-) > > diff --git a/virtproxy.c b/virtproxy.c > index 4f56aba..5ec4e77 100644 > --- a/vir

[Qemu-devel] Re: [RFC][RESEND][PATCH v1 13/15] virtproxy: add read handler for proxied connections

2010-11-03 Thread Adam Litke
On Wed, 2010-11-03 at 10:28 -0500, Michael Roth wrote: > reads data from client/server connections as they become readable, then > sends the data over the channel > > Signed-off-by: Michael Roth > --- > virtproxy.c | 80 > +++ > 1 files

Re: [Qemu-devel] [PATCH] Disable virtio-balloon memory stats interface

2010-09-14 Thread Adam Litke
Ok, I can see how this will work better for the migration case. Acked-by: Adam Litke On Tue, 2010-09-14 at 11:09 -0300, Eduardo Habkost wrote: > This field is guest-visible, won't this cause problems on migration? > > Isn't it better to disable it on the "info bal

Re: [Qemu-devel] [PATCH] Disable virtio-balloon memory stats interface

2010-09-14 Thread Adam Litke
On Tue, 2010-09-14 at 12:46 -0300, Luiz Capitulino wrote: > On Tue, 14 Sep 2010 12:42:00 -0300 > Eduardo Habkost wrote: > > > I keep my suggestion: if all we need is to change the way "info balloon" > > behaves, then we can simply change the "info balloon" behavior, intead > > of changing the gue

Re: [Qemu-devel] [PATCH] Disable virtio-balloon memory stats interface

2010-09-14 Thread Adam Litke
On Tue, 2010-09-14 at 11:09 -0300, Eduardo Habkost wrote: > On Wed, Sep 08, 2010 at 09:21:16AM -0500, Adam Litke wrote: > > The addition of memory stats reporting to the virtio balloon causes > > the 'info balloon' command to become asynchronous. This is a regression >

[Qemu-devel] [PATCH] [For 0.13] Disable virtio-balloon memory stats interface

2010-09-08 Thread Adam Litke
3. Signed-off-by: Adam Litke --- hw/virtio-balloon.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 9fe3886..269bc22 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -190,7 +190,17 @@ s

[Qemu-devel] [PATCH] Disable virtio-balloon memory stats interface

2010-09-08 Thread Adam Litke
Signed-off-by: Adam Litke --- hw/virtio-balloon.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 9fe3886..dcdada6 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -190,7 +190,17 @@ s

[Qemu-devel] [PATCH] Disable virtio-balloon memory stats interface

2010-08-30 Thread Adam Litke
not designed to handle lost or delayed responses. To fix this regression, the virtio balloon memory stats feature is being disabled in qemu-0.13. Signed-off-by: Adam Litke diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 9fe3886..2d80382 100644 --- a/hw/virtio-balloon.c +++ b/hw/vir

[Qemu-devel] [PATCH] balloon: Fix overflow when reporting actual memory size

2010-03-25 Thread Adam Litke
lloon balloon: actual=1024 Signed-off-by: Adam Litke --- hw/virtio-balloon.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 086d9d1..6eedab1 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -78,7 +78,8 @

Re: [Qemu-devel] Ideas wiki for GSoC 2010

2010-03-12 Thread Adam Litke
On Fri, 2010-03-12 at 12:22 -0300, Luiz Capitulino wrote: > On Fri, 12 Mar 2010 09:11:31 -0600 > Adam Litke wrote: > > > Hi Luiz. Around the time when I introduced the new Asynchronous monitor > > command API we had talked about converting all commands to use this new >

Re: [Qemu-devel] Ideas wiki for GSoC 2010

2010-03-12 Thread Adam Litke
Hi Luiz. Around the time when I introduced the new Asynchronous monitor command API we had talked about converting all commands to use this new API so that we can cut down on duplicate code paths and confusing code. I would like to propose this as a GSoC project idea. Do you think it should stand

[Qemu-devel] [PATCH] balloon: Do not save VM state wrt asynchronous virtio operations

2010-03-09 Thread Adam Litke
the user monitor. Signed-off-by: Adam Litke diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 086d9d1..6d12024 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -261,10 +261,6 @@ static void virtio_balloon_save(QEMUFile *f, void *opaque) qemu_put_be32(f, s

[Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver (V8)

2010-03-09 Thread Adam Litke
On Tue, 2010-03-09 at 11:22 -0300, Luiz Capitulino wrote: > On Tue, 09 Mar 2010 14:51:31 +0100 > Juan Quintela wrote: > > > Any recompilation/etc would break migration. I have tried to understand > > what happened with monitor async commands, and my head exploded in > > indirections. > > The M

Re: [Qemu-devel] [PATCH] Fix hanging user monitor when using balloon command

2010-02-26 Thread Adam Litke
On Fri, 2010-02-26 at 17:26 -0300, Luiz Capitulino wrote: > This patch fixes both. One question, though: > > > @@ -2332,6 +2331,7 @@ static int do_balloon(Monitor *mon, const QDict > > *params, > > return -1; > > } > > > > +cb(opaque, NULL); > > return 0; > > } > > Ca

Re: [Qemu-devel] [PATCH] Fix hanging user monitor when using balloon command

2010-02-22 Thread Adam Litke
On Fri, 2010-02-19 at 15:47 -0600, Anthony Liguori wrote: > On 02/12/2010 02:55 PM, Adam Litke wrote: > > Arghh... Adding missing S-O-B > > > > Hi Anthony. I wonder if there was a problem when importing my async > > command handler patchset. Since the 'balloon&#x

[Qemu-devel] [PATCH] Fix hanging user monitor when using balloon command

2010-02-12 Thread Adam Litke
w. Signed-off-by: Adam Litke diff --git a/monitor.c b/monitor.c index ae125b8..f94794d 100644 --- a/monitor.c +++ b/monitor.c @@ -2258,6 +2258,7 @@ static int do_balloon(Monitor *mon, const QDict *params, return -1; } +cb(opaque, NULL); return 0; } -- Thanks, Adam

[Qemu-devel] [PATCH] Fix hanging user monitor when using balloon command

2010-02-12 Thread Adam Litke
Hi Anthony. I wonder if there was a problem when importing my async command handler patchset. Since the 'balloon' command completes immediately, it must call the completion callback before returning. That call was missing but is added by the patch below. diff --git a/monitor.c b/monitor.c index

[Qemu-devel] virtio: Add memory statistics reporting to the balloon driver (V8)

2010-01-26 Thread Adam Litke
driver and communicate them directly to the hypervisor. Signed-off-by: Adam Litke To: Anthony Liguori Cc: Avi Kivity Cc: Luiz Capitulino Cc: qemu-devel@nongnu.org diff --git a/balloon.h b/balloon.h index 60b4a5d..c3a1ad3 100644 --- a/balloon.h +++ b/balloon.h @@ -16,12 +16,13 @@ #include &

[Qemu-devel] [PATCH] New API for asynchronous monitor commands (V2)

2010-01-25 Thread Adam Litke
monitor.c once all commands are ported. Thanks to Anthony for helping me out with the initial design. Signed-off-by: Adam Litke To: Anthony Liguori cc: Luiz Capitulino Cc: Avi Kivity Cc: qemu-devel@nongnu.org diff --git a/monitor.c b/monitor.c index cadf422..58cd02c 100644 --- a/monitor.c +++ b

[Qemu-devel] Re: [RFC] New API for asynchronous monitor commands

2010-01-25 Thread Adam Litke
On Mon, 2010-01-25 at 11:08 -0200, Luiz Capitulino wrote: > > @@ -85,11 +91,19 @@ typedef struct mon_cmd_t { > > union { > > void (*info)(Monitor *mon); > > void (*info_new)(Monitor *mon, QObject **ret_data); > > +int (*info_async)(Monitor *mon, QMPCompletion *cb, vo

[Qemu-devel] [RFC] New API for asynchronous monitor commands

2010-01-22 Thread Adam Litke
helping me out with the initial design. Signed-off-by: Adam Litke To: Anthony Liguori cc: Luiz Capitulino Cc: qemu-devel@nongnu.org diff --git a/monitor.c b/monitor.c index cadf422..c0d0fa9 100644 --- a/monitor.c +++ b/monitor.c @@ -76,6 +76,12 @@ * */ +typedef struct UserQMPCompletionData

[Qemu-devel] Re: [PATCH] QMP: Fix asynchronous events delivery

2010-01-20 Thread Adam Litke
o only delivery an asynchronous > event if the 'mon' is a QMP Monitor. > > The aforementioned commit was an early version, if it was > applied to stable (it should) this one has to be applied > there too. > > Signed-off-by: Luiz Capitulino Acked-by: Adam Litke -- Thanks, Adam

[Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver (V7)

2010-01-18 Thread Adam Litke
On Mon, 2010-01-18 at 12:12 -0200, Luiz Capitulino wrote: > On Fri, 15 Jan 2010 13:54:29 -0600 > Adam Litke wrote: > > > This version improves support for multiple monitors and has been ported up > > to > > HEAD as of 01/14. > > Overall review on the Monitor

[Qemu-devel] virtio: Add memory statistics reporting to the balloon driver (V7)

2010-01-15 Thread Adam Litke
ommunicate with the host. A simpler approach is to collect memory statistics in the virtio balloon driver and communicate them directly to the hypervisor. Signed-off-by: Adam Litke To: Anthony Liguori Cc: Avi Kivity Cc: Luiz Capitulino Cc: qemu-devel@nongnu.org diff --git a/balloon.h b/ballo

[Qemu-devel] Re: [PATCH][RESPIN] QMP: Emit asynchronous events on all QMP monitors

2010-01-15 Thread Adam Litke
on the command line first (or it has ,default), the message will be directed to the user monitor (not the QMP monitor). Additionally, only one QMP session is currently able to receive async messages. To avoid this confusion, scan through the list of monitors and emit the message on each QMP monito

[Qemu-devel] [PATCH] QMP: Emit asynchronous events on all QMP monitors

2010-01-15 Thread Adam Litke
,default), the message will be directed to the user monitor (not the QMP monitor). Additionally, only one QMP session is currently able to receive async messages. To avoid this confusion, scan through the list of monitors and emit the message on each QMP monitor. Signed-off-by: Adam Litke diff

[Qemu-devel] Re: [PATCH] QMP: Save default control monitor for emitting async events

2010-01-15 Thread Adam Litke
On Fri, 2010-01-15 at 11:38 -0200, Luiz Capitulino wrote: > On Thu, 14 Jan 2010 15:20:10 -0600 > Adam Litke wrote: > > > When using a control/QMP monitor in tandem with a regular monitor, > > asynchronous > > messages can get lost depending on the order of the QEMU

[Qemu-devel] [PATCH] QMP: Save default control monitor for emitting async events

2010-01-14 Thread Adam Litke
,default), the message will be directed to the user monitor (not the QMP monitor). One solution is to save the default QMP session in another monitor pointer (ala cur_mon) and always direct asynchronous events to that monitor... Signed-off-by: Adam Litke diff --git a/monitor.c b/monitor.c index

[Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver (V6)

2010-01-13 Thread Adam Litke
On Wed, 2010-01-13 at 16:04 -0200, Luiz Capitulino wrote: > I've tried to apply this patch to play with it, but turns out it conflicts > with recent changes in hw/virtio-balloon. Ahh, I will continue my never-ending quest to stay current :) > Some comments on the QMP side of the patch follows.

[Qemu-devel] virtio: Add memory statistics reporting to the balloon driver (V6)

2010-01-11 Thread Adam Litke
ommunicate them directly to the hypervisor. Signed-off-by: Adam Litke To: Anthony Liguori Cc: Avi Kivity Cc: Luiz Capitulino Cc: Jamie Lokier Cc: qemu-devel@nongnu.org diff --git a/balloon.h b/balloon.h index 60b4a5d..7e29028 100644 --- a/balloon.h +++ b/balloon.h @@ -16,12 +16,22 @@ #in

Re: [Qemu-devel] Re: [RFD] virtio: Add memory statistics reporting to the balloon driver

2010-01-08 Thread Adam Litke
On Thu, 2010-01-07 at 16:30 -0200, Luiz Capitulino wrote: > On Thu, 7 Jan 2010 15:58:30 -0200 > Luiz Capitulino wrote: > > > I like Daniel's idea too. In practice 'refresh-balloon' is going to > > be Anthony's idea #1 for the QMP case, which seems the right way to > > do it with QMP. > > Hm, s

Re: [Qemu-devel] Re: [RFD] virtio: Add memory statistics reporting to the balloon driver

2010-01-07 Thread Adam Litke
On Thu, 2010-01-07 at 15:49 +, Daniel P. Berrange wrote: > On Thu, Jan 07, 2010 at 09:12:10AM -0600, Anthony Liguori wrote: > > On 01/05/2010 11:08 AM, Adam Litke wrote: > > >This patch has been discussed (and ACKed) in the past, but has not yet > > >been comm

[Qemu-devel] Re: [RFD] virtio: Add memory statistics reporting to the balloon driver

2010-01-07 Thread Adam Litke
Thanks for the ideas and feedback. I will play around with #4 and see if I can hack up a prototype. On Thu, 2010-01-07 at 09:22 -0600, Anthony Liguori wrote: > On 01/07/2010 09:18 AM, Avi Kivity wrote: > > On 01/07/2010 05:12 PM, Anthony Liguori wrote: > >> > >> 3) Make qemu request balloon stats

Re: [Qemu-devel] Planning for 0.13

2010-01-06 Thread Adam Litke
On Tue, 2010-01-05 at 06:43 -0600, Anthony Liguori wrote: > Hi, > > I hope everyone had a happy new year! Now that we've finished the 0.12 > release and most of us have had a nice break, I think it's time to start > planning for the next release. > > 0.12 felt a bit rushed to me. I'd like to

[Qemu-devel] [RFD] virtio: Add memory statistics reporting to the balloon driver

2010-01-05 Thread Adam Litke
This patch has been discussed (and ACKed) in the past, but has not yet been committed due to the congestion surrounding the 0.12 release and other conflicting changes. I would like to rekindle the discussion so that I can make the necessary changes to get this merged. This patch is ported to 0.12

[Qemu-devel] [PATCH][For stable-0.12] virtio: Add memory statistics reporting to the balloon driver (V5)

2009-12-09 Thread Adam Litke
driver and communicate them directly to the hypervisor. This patch implements the qemu side of the communication channel. I will post the kernel driver modifications in-reply to this message. Signed-off-by: Adam Litke Cc: Anthony Liguori Cc: Avi Kivity Cc: Rusty Russell Cc: qemu-devel@nongnu.org

[Qemu-devel] [FOR 0.12] [PATCH] Updated: virtio: Add memory statistics reporting to the balloon driver (V5)

2009-12-03 Thread Adam Litke
communicate them directly to the hypervisor. This patch implements the qemu side of the communication channel. I will post the kernel driver modifications in-reply to this message. Signed-off-by: Adam Litke Cc: Anthony Liguori Cc: Avi Kivity Cc: Rusty Russell Cc: qemu-devel@nongnu.org diff --git a

[Qemu-devel] [FOR 0.12] [PATCH] virtio: Add memory statistics reporting to the balloon driver (V5)

2009-12-03 Thread Adam Litke
communication channel. I will post the kernel driver modifications in-reply to this message. Signed-off-by: Adam Litke Cc: Anthony Liguori Cc: Avi Kivity Cc: Rusty Russell Cc: qemu-devel@nongnu.org diff --git a/balloon.h b/balloon.h index 60b4a5d..23bbffe 100644 --- a/balloon.h +++ b/balloon.h

[Qemu-devel] virtio: Add memory statistics reporting to the balloon driver (V5)

2009-12-01 Thread Adam Litke
qemu side of the communication channel. I will post the kernel driver modifications in-reply to this message. Signed-off-by: Adam Litke Cc: Anthony Liguori Cc: Avi Kivity Cc: Rusty Russell Cc: qemu-devel@nongnu.org diff --git a/balloon.h b/balloon.h index 60b4a5d..23bbffe 100644 --- a

[Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver (V3)

2009-11-19 Thread Adam Litke
On Thu, 2009-11-19 at 18:13 +0200, Avi Kivity wrote: > On 11/19/2009 05:58 PM, Adam Litke wrote: > > On Thu, 2009-11-19 at 17:22 +0200, Avi Kivity wrote: > > > >> On 11/19/2009 05:19 PM, Adam Litke wrote: > >> > >>> Rusty and Anthony, &

[Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver (V3)

2009-11-19 Thread Adam Litke
On Thu, 2009-11-19 at 17:22 +0200, Avi Kivity wrote: > On 11/19/2009 05:19 PM, Adam Litke wrote: > > Rusty and Anthony, > > If I've addressed all outstanding issues, please consider this patch for > > inclusion. Thanks. > > > > +struct virtio_balloon_stat >

[Qemu-devel] Re: virtio: Report new guest memory statistics pertinent to memory ballooning (V4)

2009-11-19 Thread Adam Litke
On Thu, 2009-11-19 at 17:19 +0200, Avi Kivity wrote: > On 11/19/2009 05:06 PM, Adam Litke wrote: > > Avi and Anthony, > > If you agree that I've addressed all outstanding issues, please consider > > this > > patch for inclusion. Thanks. > > > > >

[Qemu-devel] virtio: Add memory statistics reporting to the balloon driver (V3)

2009-11-19 Thread Adam Litke
irtio balloon driver. Signed-off-by: Adam Litke Cc: Rusty Russell Cc: Anthony Liguori Cc: virtualizat...@lists.linux-foundation.org Cc: linux-ker...@vger.kernel.org diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 200c22f..ebc9d39 100644 --- a/drivers/v

[Qemu-devel] virtio: Report new guest memory statistics pertinent to memory ballooning (V4)

2009-11-19 Thread Adam Litke
ly to the hypervisor. This patch implements the qemu side of the communication channel. I will post the kernel driver modifications in-reply to this message. Signed-off-by: Adam Litke Cc: Anthony Liguori Cc: Avi Kivity Cc: qemu-devel@nongnu.org diff --git a/balloon.h b/balloon.h index 60

[Qemu-devel] virtio: Add memory statistics reporting to the balloon driver (V2)

2009-11-17 Thread Adam Litke
hypervisor. This patch enables the guest-side support by adding stats collection and reporting to the virtio balloon driver. Signed-off-by: Adam Litke Cc: Rusty Russell Cc: Anthony Liguori Cc: virtualizat...@lists.linux-foundation.org Cc: linux-ker...@vger.kernel.org diff --git a/drivers/virtio

[Qemu-devel] virtio: Report new guest memory statistics pertinent to memory ballooning (V3)

2009-11-17 Thread Adam Litke
-by: Adam Litke Cc: Anthony Liguori Cc: Avi Kivity Cc: qemu-devel@nongnu.org diff --git a/balloon.h b/balloon.h index 60b4a5d..def4c56 100644 --- a/balloon.h +++ b/balloon.h @@ -16,12 +16,12 @@ #include "cpu-defs.h" -typedef ram_addr_t (QEMUBalloonEvent)(void *opaque, ram_add

[Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver

2009-11-11 Thread Adam Litke
On Wed, 2009-11-11 at 13:13 +1030, Rusty Russell wrote: > > It's not laziness, it's consistency. How is actual different than free > > memory or any other stat? > > Because it's a COLLECTION of stats. For example, swap in should be < swap > out. Now, the current Linux implementation of all_vm_

Re: [Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver

2009-11-11 Thread Adam Litke
On Wed, 2009-11-11 at 10:12 +, Daniel P. Berrange wrote: > This all suggests that we should only update the stats from the guest > when something on the host actually asks for them by issuing the QEMU > monitor command. We don't want any kind of continuous polling of stats > at any frequency, i

Re: [Qemu-devel] [RFC] virtio: Report new guest memory statistics pertinent to memory ballooning (V2)

2009-11-09 Thread Adam Litke
On Mon, 2009-11-09 at 19:01 +, Jamie Lokier wrote: > These days, would it make more sense to emit a QJSON object? > > In this case the JSON object is quite human readable too. I'm not very particular on the output format since it's main consumer is likely another program. Is XML output via t

Re: [Qemu-devel] [RFC] virtio: Report new guest memory statistics pertinent to memory ballooning (V2)

2009-11-09 Thread Adam Litke
On Mon, 2009-11-09 at 19:00 +, Jamie Lokier wrote: > Adam Litke wrote: > > +s->stats.pswapin = has_feature(dev, VIRTIO_BALLOON_F_RPT_SWAP_OUT) > > ? > > + dev->stats.pswapin : -1; > > (etc.) > > Why not s

[Qemu-devel] virtio: Add memory statistics reporting to the balloon driver

2009-11-09 Thread Adam Litke
? Signed-off-by: Adam Litke Cc: Rusty Russell Cc: Anthony Liguori Cc: Avi Kivity Cc: virtualizat...@lists.linux-foundation.org Cc: linux-ker...@vger.kernel.org diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 200c22f..0c9a9a1 100644 --- a/drivers/virtio

[Qemu-devel] [RFC] virtio: Report new guest memory statistics pertinent to memory ballooning (V2)

2009-11-09 Thread Adam Litke
patch implements the qemu side of the communication channel. I will post the kernel driver modifications in-reply to this message. Signed-off-by: Adam Litke Cc: Anthony Liguori Cc: Avi Kivity diff --git a/balloon.h b/balloon.h index 60b4a5d..4008d1b 100644 --- a/balloon.h +++ b/balloon.h

[Qemu-devel] virtio: Add memory statistics reporting to the balloon driver

2009-11-05 Thread Adam Litke
communicate them to the host via the device config space. This patch enables the guest-side support by adding stats collection and reporting to the virtio balloon driver. Signed-off-by: Adam Litke diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 3a43ebf

[Qemu-devel] [RFC] virtio: Report new guest memory statistics pertinent to memory ballooning

2009-11-05 Thread Adam Litke
: panon=3928 KB balloon: pgmajfault=0 balloon: pgminfault=247914 balloon: memfree=987032 KB balloon: memtot=1020812 KB Is this agreeable? Thank you for your comments... Signed-off-by: Adam Litke diff --git a/balloon.h b/balloon.h index 60b4a5d.