qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: "Bryan D. Payne" <bdpayne@acm.org>
Cc: lcapitulino@redhat.com, Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qmp: extend QMP to provide read/write access to physical memory
Date: Thu, 11 Dec 2014 13:45:08 +0800	[thread overview]
Message-ID: <20141211054508.GA21182@ad.nay.redhat.com> (raw)
In-Reply-To: <CAFpPvXCvboTFHg3O2neg5LNBGkWzEwvCv01LNhScQxrBrayfog@mail.gmail.com>

On Wed, 12/10 21:33, Bryan D. Payne wrote:
> > By "evidence", I mean actual numbers for actual QEMU code.  Nothing
> >> sophisticated, just use your new interface in a way you consider
> >> relevant for your own use case, then approximate this use with existing
> >> interfaces.  The approximation can be very rough.  For instance, showing
> >> that doing the whole job with your approach is a much faster than doing
> >> a necessary part of the job with existing commands would do.
> >>
> >
> > Sure, I can put together some numbers to help with this discussion.
> >
> 
> I've done some performance testing on my laptop.  I have setup LibVMI to
> access KVM guest memory using one of three different options:
> 
> QMP/pmemsave (dump bytes to a file and then read that back into memory)
> HMC/xp command (dump bytes via human monitor command and repack the output
> to binary form)
> QMP/pmemaccess (access bytes through a Unix socket, this is the patch we
> are discussing in this thread)
> 
> For each of these I measured the time required to translate a guest kernel
> virtual address into a guest physical address.  This is done with a 64-bit
> Ubuntu Trusty guest and the addresses are translated by walking the page
> tables in the guest using the selected memory access technique.
> 
> You can see the graph here:
> http://cl.ly/image/322a3s0h1V05
> 
> For those that prefer text, here's the numbers (in microseconds):
> QMP/pmemsave: 77706
> HMC/xp command: 92552
> QMP/pmemaccess: 95
> 
> As you can see, the technique proposed in this patch is about 3 orders of
> magnitude faster than the options available in Qemu today.  I will also
> note that this is for a _single_ virtual address translation.  A typical
> introspection application will be doing much more work than this, which
> will only compound the problem.
> 
> Hopefully this helps to explain why I believe that this is an improvement
> to the existing mechanisms.  Please let me know if you have any questions
> about these results.
> 
> I'll continue some exploration of doing the pmemaccess bulk data transfer
> over QMP, instead of the UNIX socket.  And I'll report back here once I've
> come up with some thoughts on the best way to proceed.
> 

Look good. I believe QMP will be in between, and if it doesn't work as well,
could you also try to use QEMU's char dev instead of limit this to unix socket?

Fam

  reply	other threads:[~2014-12-11  5:45 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26  8:41 [Qemu-devel] [PATCH 0/1] qmp: extend QMP to provide read/write access to physical memory Bryan D. Payne
2014-11-26  8:41 ` [Qemu-devel] [PATCH 1/1] " Bryan D. Payne
2014-11-26 15:16   ` Eric Blake
2014-11-26 20:27 ` [Qemu-devel] [PATCH v2] " Bryan D. Payne
2014-11-26 20:27   ` [Qemu-devel] [PATCH] " Bryan D. Payne
2014-11-27  2:04     ` Fam Zheng
2014-12-04  3:37       ` Bryan D. Payne
2014-12-04  4:57         ` Fam Zheng
2014-12-04  6:28           ` Bryan D. Payne
2014-12-04  7:38             ` Fam Zheng
2014-12-04 16:43               ` Bryan D. Payne
2014-12-05  1:20                 ` Fam Zheng
2014-12-04  9:08         ` Markus Armbruster
2014-12-04 16:49           ` Bryan D. Payne
2014-12-05  8:44             ` Markus Armbruster
2014-12-05 21:25               ` Bryan D. Payne
2014-12-08 15:06                 ` Markus Armbruster
2014-12-09 15:12                   ` Bryan D. Payne
2014-12-11  3:33                     ` Bryan D. Payne
2014-12-11  5:45                       ` Fam Zheng [this message]
2014-12-11  6:07                         ` Bryan D. Payne
2014-12-12  2:28                         ` Bryan D. Payne
2014-12-12  3:29                           ` Fam Zheng
2014-12-01 22:10     ` Eric Blake
2014-12-03 23:07       ` Bryan D. Payne
2014-12-04 15:08         ` Eric Blake
2014-12-04 16:50           ` Bryan D. Payne
2014-12-04 18:40           ` Bryan D. Payne
2014-12-04 22:43             ` Eric Blake
2014-12-01 22:12   ` [Qemu-devel] [PATCH v2] " Eric Blake
2014-12-02  4:36     ` Bryan D. Payne
2014-12-02  5:26       ` Fam Zheng

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=20141211054508.GA21182@ad.nay.redhat.com \
    --to=famz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=bdpayne@acm.org \
    --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).