All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	kvm@vger.kernel.org, yoshihiro.yunomae.ez@hitachi.com,
	mtosatti@redhat.com, qemu-devel@nongnu.org, rostedt@goodmis.org,
	linux-trace-users@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [RFC] host and guest kernel trace merging
Date: Fri, 25 Mar 2016 10:22:03 +0800	[thread overview]
Message-ID: <20160325022203.GG28183@pxdev.xzpeter.org> (raw)
In-Reply-To: <20160324101317.GB21069@stefanha-x1.localdomain>

On Thu, Mar 24, 2016 at 10:13:17AM +0000, Stefan Hajnoczi wrote:
> There are probably race conditions if the tsc offset is queried
> independently from the trace collection.  For example, imagine the host
> is suspend right when tracing begins.  I think the TSC could be adjusted
> when the host wakes up again.

Right... So maybe we should never allow tsc-offset change
(e.g. suspend) happen during host-guest tracing?  It seems more like
a question about "whether we can do a merge", rather than "read a
correct offset"... If it changes, we cannot do the merge any more
(only if we record the offset for each guest entry)...

> 
> Ideally the TSC information would be part of the trace data so that
> there are no race conditions when interpeting time stamps.

Agree. We should keep the tsc-offset in the trace data.

Thanks.

-- peterx

WARNING: multiple messages have this Message-ID (diff)
From: Peter Xu <peterx@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: kvm@vger.kernel.org, Stefan Hajnoczi <stefanha@gmail.com>,
	yoshihiro.yunomae.ez@hitachi.com, mtosatti@redhat.com,
	qemu-devel@nongnu.org, rostedt@goodmis.org,
	Luiz Capitulino <lcapitulino@redhat.com>,
	linux-trace-users@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [RFC] host and guest kernel trace merging
Date: Fri, 25 Mar 2016 10:22:03 +0800	[thread overview]
Message-ID: <20160325022203.GG28183@pxdev.xzpeter.org> (raw)
In-Reply-To: <20160324101317.GB21069@stefanha-x1.localdomain>

On Thu, Mar 24, 2016 at 10:13:17AM +0000, Stefan Hajnoczi wrote:
> There are probably race conditions if the tsc offset is queried
> independently from the trace collection.  For example, imagine the host
> is suspend right when tracing begins.  I think the TSC could be adjusted
> when the host wakes up again.

Right... So maybe we should never allow tsc-offset change
(e.g. suspend) happen during host-guest tracing?  It seems more like
a question about "whether we can do a merge", rather than "read a
correct offset"... If it changes, we cannot do the merge any more
(only if we record the offset for each guest entry)...

> 
> Ideally the TSC information would be part of the trace data so that
> there are no race conditions when interpeting time stamps.

Agree. We should keep the tsc-offset in the trace data.

Thanks.

-- peterx

  reply	other threads:[~2016-03-25  2:22 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03 19:35 [RFC] host and guest kernel trace merging Luiz Capitulino
2016-03-03 19:35 ` [Qemu-devel] " Luiz Capitulino
2016-03-04 11:19 ` Stefan Hajnoczi
2016-03-04 13:23   ` Steven Rostedt
2016-03-04 13:23     ` Steven Rostedt
2016-03-04 13:23     ` Steven Rostedt
2016-03-07 15:17     ` [Qemu-devel] " Stefan Hajnoczi
2016-03-07 15:17       ` Stefan Hajnoczi
2016-03-07 15:49       ` Steven Rostedt
2016-03-07 15:49         ` Steven Rostedt
2016-03-07 16:10         ` Eric Blake
2016-03-07 16:26           ` Steven Rostedt
2016-03-07 16:26             ` Steven Rostedt
2016-03-07 17:13             ` Paolo Bonzini
2016-03-07 17:13               ` Paolo Bonzini
2016-03-24  5:16     ` Peter Xu
2016-03-24  5:16       ` Peter Xu
2016-03-24 13:02       ` Luiz Capitulino
2016-03-24 13:02         ` Luiz Capitulino
2016-03-25  1:53         ` Peter Xu
2016-03-25  1:53           ` Peter Xu
2016-03-24  8:42   ` Peter Xu
2016-03-24  8:42     ` Peter Xu
2016-03-24 10:13     ` Stefan Hajnoczi
2016-03-24 10:13       ` Stefan Hajnoczi
2016-03-25  2:22       ` Peter Xu [this message]
2016-03-25  2:22         ` Peter Xu

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=20160325022203.GG28183@pxdev.xzpeter.org \
    --to=peterx@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=lcapitulino@redhat.com \
    --cc=linux-trace-users@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rostedt@goodmis.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    --cc=yoshihiro.yunomae.ez@hitachi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.