qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
	qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] RFC: moving fsfreeze support from the userland guest agent to the guest kernel
Date: Thu, 28 Jul 2011 10:26:33 -0500	[thread overview]
Message-ID: <4E317FA9.4000901@linux.vnet.ibm.com> (raw)
In-Reply-To: <4E3123AB.4030600@redhat.com>

On 07/28/2011 03:54 AM, Jes Sorensen wrote:
> On 07/27/11 18:40, Andrea Arcangeli wrote:
>>> Another thing to note is that snapshotting is not necessarily something
>>>> that should be completely transparent to the guest. One of the planned
>>>> future features for the guest agent (mentioned in the snapshot wiki, and
>>>> a common use case that I've seen come up elsewhere as well in the
>>>> context of database applications), is a way for userspace applications
>>>> to register callbacks to be made in the event of a freeze (dumping
>>>> application-managed caches to disk and things along that line). The
>> Not sure if the scripts are really needed or if they would just open a
>> brand new fsfreeze specific unix domain socket (created by the
>> database) to tell the database to freeze.
>>
>> If the latter is the case, then it'd be better rather than changing
>> the database to open unix domain socket so the script can connect to
>> it when invoked (or maybe to just add some new function to the
>> protocol of an existing open unix domain socket), to instead change
>> the database to open a /dev/virtio-fsfreeze device, created by the
>> virtio-fsfreeze.ko virtio driver through udev. The database would poll
>> it, and it could read the request to freeze, and write into it that it
>> finished freezing when done. Then when all openers of the device
>> freezed, the virtio-fsfreeze.ko would go ahead freezing all the
>> filesystems, and then tell qemu when it's finished freezing. Then qemu
>> can finally block all the I/O and tell libvirt to go ahead with the
>> snapshot.
>
> I think it could also be a combined operation, ie. having the freeze
> happen in the kernel, but doing the callouts using a userspace daemon. I
> like the userspace daemon for the callouts because it allows providing a
> more sophisticated API than if we provide just a socket like interface.
> In addition the callout is less critical wrt crashes than the fsfreeze
> operations.
>

I'd prefer this approach as well. We could potentially implement it with 
a more general mechanism for executing scripts in the guest for whatever 
reason, rather than an fsfreeze-specific one.

Let the management layer handle the orchestration between the 2. Whether 
the freeze is kernel-driven or not I think can go either way, though the 
potential issues I mentioned in response the Fernando's post seem to 
those proposed changes are required for a "proper" guest agent 
implementation, and at that point we're talking about kernel changes 
either way for the functionality we ultimately want.

I think there may still be value in retaining the current fsfreeze 
support in the agent for older guests, however. What I'm convinced of 
now though is that the operation should not be tethered to the 
application callback operation, since that's applicable to other 
potential fsfreeze mechanisms.

> Cheers,
> Jes

  reply	other threads:[~2011-07-28 15:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27 15:24 [Qemu-devel] RFC: moving fsfreeze support from the userland guest agent to the guest kernel Andrea Arcangeli
2011-07-27 16:07 ` Michael Roth
2011-07-27 16:40   ` Andrea Arcangeli
2011-07-28  8:54     ` Jes Sorensen
2011-07-28 15:26       ` Michael Roth [this message]
2011-07-27 16:34 ` Anthony Liguori
2011-07-27 16:50   ` Andrea Arcangeli
2011-07-27 18:36   ` Christoph Hellwig
2011-07-27 19:47     ` Andrea Arcangeli
2011-07-28  8:56     ` Jes Sorensen
2011-07-28  2:53 ` Fernando Luis Vázquez Cao
2011-07-28  8:03   ` Andrea Arcangeli
2011-07-28 15:11     ` Michael Roth
2011-07-29  0:29       ` Fernando Luis Vazquez Cao
2011-08-07 18:28 ` Ronen Hod
2011-08-08 13:26   ` Luiz Capitulino

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=4E317FA9.4000901@linux.vnet.ibm.com \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).