From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYYb0-0000PH-Gh for qemu-devel@nongnu.org; Wed, 14 Nov 2012 03:45:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYYax-0006Ce-EP for qemu-devel@nongnu.org; Wed, 14 Nov 2012 03:45:18 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:45315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYYax-0006CW-7q for qemu-devel@nongnu.org; Wed, 14 Nov 2012 03:45:15 -0500 Received: by mail-ea0-f173.google.com with SMTP id i13so78740eaa.4 for ; Wed, 14 Nov 2012 00:45:14 -0800 (PST) Date: Wed, 14 Nov 2012 09:45:09 +0100 From: Stefan Hajnoczi Message-ID: <20121114084509.GB23826@stefanha-thinkpad.redhat.com> References: <50A313A5.8030500@linux.vnet.ibm.com> <50A314EE.6080801@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50A314EE.6080801@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [RFC] libqblock OOM issue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: Kevin Wolf , Anthony Liguori , qemu-devel , Blue Swirl , Paolo Bonzini On Wed, Nov 14, 2012 at 11:50:06AM +0800, Wenchao Xia wrote: > In order to resolve OOM issue, I am trying wrap all APIs using > sunrpc, need some suggestion before coding. Is the client/server approach really necessary or can you write a library that invokes qemu-nbd/qemu-img? If there is a startup cost problem with qemu-img it may be possible to add an interactive mode (like qemu-io) where qemu-img stays open and responds to commands (maybe in JSON encoding). The difference between this and the RPC approach is that you can write a relatively thin NBD and qemu-img library with the tools that already exist today. Stefan