From: Petr Tesarik <ptesarik@suse.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Eric Blake <eblake@redhat.com>, Nan Li <nli@suse.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] Dump: introduce a Filesystem in Userspace
Date: Tue, 10 May 2016 13:55:10 +0200 [thread overview]
Message-ID: <20160510135510.643ed3d7@hananiah.suse.cz> (raw)
In-Reply-To: <20160510095642.GF11408@stefanha-x1.localdomain>
[-- Attachment #1: Type: text/plain, Size: 2869 bytes --]
On Tue, 10 May 2016 10:56:42 +0100
Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Tue, May 10, 2016 at 07:59:41AM +0200, Petr Tesarik wrote:
> > On Mon, 9 May 2016 09:52:28 -0600
> > Eric Blake <eblake@redhat.com> wrote:
> >
> > > On 05/07/2016 05:32 PM, Nan Li wrote:
> > > > When running the command "dump-guest-memory", we usually need a large space
> > > > of storage to save the dumpfile into disk. It costs not only much time to
> > > > save a file in some of hard disks, but also costs limited storage in host.
> > > > In order to reduce the saving time and make it convenient for users to dump
> > > > the guest memory, we introduce a Filesystem in Userspace (FUSE) to save the
> > > > dump file in RAM. It is selectable in the configure file, adding a compiling
> > > > of package "fuse-devel". It doesn't change the way of dumping guest memory.
> > >
> > > Why introduce FUSE? Can we reuse NBD instead?
> >
> > Let me answer this one, because it's me who came up with the idea,
> > although I wasn't involved in the actual implementation.
> >
> > The idea is to get something more like Linux's /proc/kcore, but for a
> > QEMU guest. So, yes, the same idea could be implemented as a standalone
> > application which talks to QEMU using the gdb remote protocol and
> > exposes the data in a structured form through a FUSE filesystem.
> >
> > However, the performance of such a solution cannot get even close to
> > that of exposing the data directly from QEMU. Maybe it's still the best
> > way to start the project...
>
> If you want no overhead and are willing to pause the guest, use QEMU's
> gdb stub (directly, no extra FUSE file system layer).
Well, the obvious downside of this solution is that you need GDB
protocol support. AFAIK there are more tools which can work with ELF
dump files than with the GDB protocol. Sure, I could add GDB protocol
support to each and every one of them, but I fail to see how that is
better use of time than adding an additional layer which allows to use
any ELF-capable tool directly.
> If you cannot
> pause the guest then take a copy of memory with dump-guest-memory to
> tmpfs.
>
> There might be a middle-ground where you can copy-on-write pages and let
> the guest continue to run, but this is probably not worth the
> effort/complexity.
>
> I find it hard to see where adding more code or using FUSE would make
> things better?
Please see my explanation in another branch of this thread why
generating dump files on the fly is better for some use cases than
saving a complete copy.
BTW FUSE is definitely not tmpfs. See the nice diagram on Wikipedia:
https://en.wikipedia.org/wiki/Filesystem_in_Userspace
Our main motivation is not better performance but more flexibility.
OTOH why should we burn more CPU cycles than necessary?
Petr T
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-05-10 11:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-07 23:32 [Qemu-devel] [PATCH 0/2] Dump: add a Filesystem in Userspace and command "fuse-mount" Nan Li
2016-05-07 23:32 ` [Qemu-devel] [PATCH 1/2] Dump: introduce a Filesystem in Userspace Nan Li
2016-05-09 15:52 ` Eric Blake
2016-05-09 16:13 ` Daniel P. Berrange
2016-05-09 16:20 ` Petr Tesarik
2016-05-09 16:32 ` Daniel P. Berrange
2016-05-10 6:19 ` Petr Tesarik
2016-05-10 8:39 ` Daniel P. Berrange
2016-05-10 5:59 ` Petr Tesarik
2016-05-10 8:48 ` Daniel P. Berrange
2016-05-10 9:42 ` Petr Tesarik
2016-05-10 11:26 ` Nan Li
2016-05-10 9:56 ` Stefan Hajnoczi
2016-05-10 11:02 ` Nan Li
2016-05-10 11:55 ` Petr Tesarik [this message]
2016-05-12 10:09 ` Stefan Hajnoczi
2016-05-12 10:30 ` Petr Tesarik
2016-05-07 23:32 ` [Qemu-devel] [PATCH 2/2] Dump: add command "fuse-mount" Nan Li
2016-05-09 16:30 ` Daniel P. Berrange
2016-05-09 16:48 ` Eric Blake
2016-05-10 11:32 ` Nan Li
2016-05-10 9:47 ` [Qemu-devel] [PATCH 0/2] Dump: add a Filesystem in Userspace and " Stefan Hajnoczi
2016-05-10 9:50 ` Stefan Hajnoczi
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=20160510135510.643ed3d7@hananiah.suse.cz \
--to=ptesarik@suse.com \
--cc=eblake@redhat.com \
--cc=nli@suse.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).