All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Dario Faggioli <dfaggioli@suse.com>
Cc: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>,
	linux-trace-devel@vger.kernel.org
Subject: Re: Accuracy of traces sync [Was: Re: [PATCH] Fix `make -jN trace-cmd gui`]
Date: Fri, 20 Nov 2020 09:08:28 -0500	[thread overview]
Message-ID: <20201120090828.4b62d4b7@gandalf.local.home> (raw)
In-Reply-To: <849f846631f3014c3eff7f37a7d61493e2af66a9.camel@suse.com>

On Fri, 20 Nov 2020 14:43:21 +0100
Dario Faggioli <dfaggioli@suse.com> wrote:

> On Fri, 2020-11-20 at 14:32 +0200, Yordan Karadzhov (VMware) wrote:
> > On 20.11.20 г. 14:06 ч., Dario Faggioli wrote:  
> > > >   
> > > Yep, sure! I followed the talks you've been giving about it at
> > > events, and I even played a little with what you have here:
> > > 
> > > https://github.com/yordan-karadzhov/kernel-shark-2.alpha
> > > 
> > > The host-guest tracing part, as I think you can guess.  
> > 
> > Ciao Dario,
> >  
> Hey!
> 
> > I am very happy to hear that. The timestamp synchronization patches
> > for 
> > trace-cmd are almost ready to go upstream.
> >   
> Yes, I tried those patches!
> 
> In fact, now that I have you here, do you mind if I change the subject
> and ask a quick question about them?
> 
> So, you often say that "the accuracy of the synchronization protocol is
> XX ms". Now, I guess that means that an event in the guest and the

Note, we are usually microsecond (us) apart, not millisecond (ms) ;-)

> corresponding event in the host (or vice versa) are XX ms apart. And
> that's even after the synchronization of the two traces, is that right?

At plumbers we talked with Thomas Gleixner and he suggested ideas of how to
get to the actual shifts used in the hardware that should give us exact
timestamp offsets. We are currently working on that. But in the mean time,
the P2P is giving us somewhere between 5 and 10 us accuracy. And that's
simply because the jitter of the vsock connection (which is used for the
synchronization at start and end of the traces) has a 5 to 10 us jitter,
and it's not possible to get a more accurate than the medium that is being
used.

> 
> Question is, how do you measure that? Sure, I can look manually for an
> occurrence of the pattern that I described above: i.e., an event in the
> guest, then the corresponding one in the host and compute the
> difference between the timestamps.

You mean, how we measure the accuracy? It's usually done by seeing when we
have events from the guest showing up when we should be in the host (it's
like seeing events from userspace when you are in the kernel).

> 
> But do you have a way to do so automatically, or with a script/program,
> etc?

We have talked about having something scan to find cases where the guest
event happens in kernel and do some post processing shifting, but haven't
gotten there yet. If the hardware settings can work, then there will be no
need to do so.

-- Steve

> 
> I saw that the series included a patch which was meant at debugging and
> profiling PTP, but even with that one applied and having it generate
> the graphs, I have not been able to get that info without manual
> inspection.
> 
> > And we are currently reviewing a beta version of KernelShark_2 that
> > will 
> > include the guest/host visualization.
> > As Steven said: stay tuned!
> >   
> You bet I will. :-P
> 
> Thanks and Regards


  reply	other threads:[~2020-11-20 14:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 21:16 [PATCH] Fix `make -jN trace-cmd gui` Dario Faggioli
2020-11-20  3:09 ` Steven Rostedt
2020-11-20 12:06   ` Dario Faggioli
2020-11-20 12:32     ` Yordan Karadzhov (VMware)
2020-11-20 13:43       ` Accuracy of traces sync [Was: Re: [PATCH] Fix `make -jN trace-cmd gui`] Dario Faggioli
2020-11-20 14:08         ` Steven Rostedt [this message]
2020-11-26  0:15           ` Dario Faggioli
2020-11-26  3:53             ` Tzvetomir Stoyanov

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=20201120090828.4b62d4b7@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=dfaggioli@suse.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=y.karadz@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 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.