qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Blue Swirl <blauwirbel@gmail.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [RFC] libqblock OOM issue
Date: Wed, 14 Nov 2012 17:55:28 +0800	[thread overview]
Message-ID: <50A36A90.9000402@linux.vnet.ibm.com> (raw)
In-Reply-To: <20121114084509.GB23826@stefanha-thinkpad.redhat.com>

 > 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
>

   I understand your reason about using qemu-img and qemu-nbd and
appreciate for the suggestion. Currently libqblock already have the
capabilities of r/w images as qemu-nbd, and have info retrieving
capabilities as qemu-img. So the difference will be:
   using qemu-img qemu-nbd, it needs nbd client/json parser code, 
modification for qemu-img is needed for each new function added in
libqblock.
   using rpc plus native lib, it needs good framework to transparently
pass the information to client side for every API.
   IMHO, considering now libqblock have all the capabilities required
except OOM, it is not hard to get same effect as using qemu-img and
qemu-nbd, by wrapping read/write/info retrieve APIs if I keep the
file stays open in server side and make server/client not mirrored.
How to write a good enough framework which can wrap different API in an
unified style, and keep this layer as simple, as transparent as
possible, whether I should break the mirror between client/server, are
some question I am not quite sure.



-- 
Best Regards

Wenchao Xia

  reply	other threads:[~2012-11-14  9:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <50A313A5.8030500@linux.vnet.ibm.com>
2012-11-14  3:50 ` [Qemu-devel] [RFC] libqblock OOM issue Wenchao Xia
2012-11-14  8:45   ` Stefan Hajnoczi
2012-11-14  9:55     ` Wenchao Xia [this message]
2012-11-14 10:32       ` Paolo Bonzini
2012-11-15  4:18         ` Wenchao Xia
2012-11-15 10:31           ` Paolo Bonzini
2012-11-15 12:21             ` Wenchao Xia
2012-11-15 12:34               ` Paolo Bonzini
2012-11-14  8:55   ` Paolo Bonzini
2012-11-14 10:06     ` Wenchao Xia

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=50A36A90.9000402@linux.vnet.ibm.com \
    --to=xiawenc@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --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 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).