From: Avi Kivity <avi@redhat.com>
To: Dhaval Giani <dhaval.giani@gmail.com>
Cc: kvm@vger.kernel.org, joro@8bytes.org, agraf@suse.de,
rostedt@goodmis.org, linux-kernel@vger.kernel.org,
Fabio Checconi <fchecconi@gmail.com>,
Tommaso Cucinotta <tommaso.cucinotta@sssup.it>
Subject: Re: [PATCH] kvm: log directly from the guest to the host kvm buffer
Date: Thu, 12 May 2011 18:42:42 +0300 [thread overview]
Message-ID: <4DCBFFF2.3030804@redhat.com> (raw)
In-Reply-To: <BANLkTi=BnRCJ4S32S=+zNNOSTxmZsR6Jrg@mail.gmail.com>
On 05/12/2011 06:39 PM, Dhaval Giani wrote:
> >
> > I think that one hypercall per trace is too expensive. Tracing is meant to
> > be lightweight! I think the guest can log to a buffer, which is flushed on
> > overflow or when a vmexit occurs. That gives us automatic serialization
> > between a vcpu and the cpu it runs on, but not between a vcpu and a
> > different host cpu.
> >
>
> hmm. So, basically, log all of these events, and then send them to the
> host either on an exit, or when your buffer fills up. There is one
> problem with approach though. One of the reasons I wanted this
> approach was beacuse i wanted to co-relate the guest and the host
> times. (which is why I kept is synchronous). I lose out that
> information with what you say. However I see your point about the
> overhead. I will think about this a bit more.
You might use kvmclock to get a zero-exit (but not zero-cost) time which
can be correlated.
Another option is to use xadd on a shared memory area to have a global
counter incremented. However that can be slow on large machines, and is
hard to do securely with multiple guests.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2011-05-12 15:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-12 13:36 [PATCH] kvm: log directly from the guest to the host kvm buffer Dhaval Giani
2011-05-12 15:13 ` Avi Kivity
2011-05-12 15:39 ` Dhaval Giani
2011-05-12 15:42 ` Avi Kivity [this message]
2011-05-12 23:59 ` Eric Northup
2011-05-17 15:50 ` Steven Rostedt
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=4DCBFFF2.3030804@redhat.com \
--to=avi@redhat.com \
--cc=agraf@suse.de \
--cc=dhaval.giani@gmail.com \
--cc=fchecconi@gmail.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tommaso.cucinotta@sssup.it \
/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