From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MK7x8-000155-Dt for qemu-devel@nongnu.org; Fri, 26 Jun 2009 05:42:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MK7x3-000115-5W for qemu-devel@nongnu.org; Fri, 26 Jun 2009 05:42:37 -0400 Received: from [199.232.76.173] (port=33640 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MK7x2-00010l-UA for qemu-devel@nongnu.org; Fri, 26 Jun 2009 05:42:33 -0400 Received: from mx1.redhat.com ([66.187.233.31]:47548) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MK7x2-0004Go-GV for qemu-devel@nongnu.org; Fri, 26 Jun 2009 05:42:32 -0400 Date: Fri, 26 Jun 2009 10:42:24 +0100 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] Re: [PATCH 08/11] QMP: Port balloon command Message-ID: <20090626094224.GE28206@redhat.com> References: <20090623012933.5b217767@doriath> <4A40A386.7020102@redhat.com> <4A40DFCE.5050008@codemonkey.ws> <20090623135958.660903e1@doriath> <4A412135.2060804@us.ibm.com> <4A435F09.7050702@redhat.com> <20090625161143.01b56eea@doriath> <4A4492FD.4040704@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A4492FD.4040704@redhat.com> Reply-To: "Daniel P. Berrange" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Anthony Liguori , ehabkost@redhat.com, jan.kiszka@siemens.com, dlaor@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino On Fri, Jun 26, 2009 at 12:21:01PM +0300, Avi Kivity wrote: > On 06/25/2009 10:11 PM, Luiz Capitulino wrote: > > > > Yes, having a library was suggested by Amit some months ago. The > >problem is that it has various issues wrt maintainability. > > > > For example, libvirt is able to run two instances of different > >versions of qemu at the same time. How to handle this if you > >update libmonitor.so? > > The sane way is to *NOT* break ABI of libmonitor.so, and not change the wire protocol in a non backwards compatible way. This is entirely doable, it just the maintainer of libmonitor/qemu to decide that ABI stability is important. So if you find an existing API / command needs to gain an extra argument, you don't change the existing API, you add a new one. Or ideally design the API upfront so that it can be extended without breaking back compatability. > You could use dlopen(). The problem with a library is that it assumes > everyone is still trapped in C, which is not the case. dlopen() of a different libmonitor.so for every version of QEMU is just crazy, whether C or not. Maintain ABI & protocol back compatability with new releases and avoid the issue in the first place. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|