Re: Accuracy of traces sync [Was: Re: [PATCH] Fix `make -jN trace-cmd gui`]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2020-11-20 at 09:08 -0500, Steven Rostedt wrote:
> On Fri, 20 Nov 2020 14:43:21 +0100
> Dario Faggioli <dfaggioli@xxxxxxxx> wrote:
> > 
> > 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) ;-)
> 
Ah, yes, sure... And sorry about that! I know it us, I'm not sure how I
ended up writing ms. That would be quite terrible indeed! :-D

> > 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. 
>
Yes, I remember that, I attended the BoF.

> 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.
> 
Yes, with a student that I was helping with his thesis, we applied one
debug patch to trace-cmd that you have on this list, and we tried the
different synchronization strategies, frequency, etc.

> > 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).
> 
Ok, makes sense. I need to try it first hand to make sure I've properly
understood it, though. I'll collect some more tracing and looks for
situations like these.

Thanks!

> > 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. 
>
Yep, as said, I was thinking at it as a way to measure how accurately
the traces are synched, but indeed once one has it, it can even use it
to actually synch them better.

But I understand how it's rather tricky.

> If the hardware settings can work, then there will be no
> need to do so.
> 
Indeed. Well, perhaps it could still be useful, as a test/check whether
things are working? :-)

Regards
-- 
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux