All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>
Cc: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
	Or Gerlitz <gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Matan Barak
	<matanb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>,
	Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Amir Vadai <amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Tal Alon <talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH for-next V2 0/9] Add completion timestamping support
Date: Sat, 06 Jun 2015 11:45:46 -0400	[thread overview]
Message-ID: <1433605546.40123.217.camel@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1506060304480.29634-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 3288 bytes --]

On Sat, 2015-06-06 at 03:16 -0500, Christoph Lameter wrote:
> On Wed, 3 Jun 2015, Jason Gunthorpe wrote:
> 
> > On Wed, Jun 03, 2015 at 07:55:58PM -0500, Christoph Lameter wrote:
> >
> > > I thknk the raw cycles and the rought oscillator speed are fine.
> >
> > Time keeping is designed to adjust for 100's of ppm drift between
> > clocks.
> 
> What time keeping? Ntp? pptp is supposed to be accurate to 10s of ns and
> we would need an accuracy in that range.
> 
> > A communications clock source will be spec'd to be below 200ppm in
> > accuracy. IB clocks are below 100 ppm, and PCI-E is 300ppm (approx, I
> > didn't check, order of magnitue is close)
> 
> Well that is not usable. ns are a billionth of a second which is the unit
> of measurement of these activities here. A send action can be around 600-1000ns.
> If we are off by 200ppm then that is 200 microseconds meaning 200000 ns.
> And its our experience that these clocks can be off by milliseconds in
> practice.

The ppm rating is based upon the speed of the clock, not time.  It's how
many cycles of variance you are allowed from the target speed given in
cycles / millions of cycles of the target clock frequency.  If you have
a 312.5MHz clock, and your accuracy is specified as 100ppm, then the
total clock variability is 312.5 * 100 = 31250 cycles (I suspect that
this is an absolute variance, and so the tolerance would be +-1/2 of the
total amount, but I don't know that for certain).

> > That translates into 0.0625 Hz. for a 312.5 MHz ethernet reference clock

I don't know how this number is derived, but 0.0625Hz sounds like an odd
variance.

> Ok that is around 3ns per cycle? And you think the accuracy is therefore
> in femtoseconds? I have never seen something that accurate. Wish something
> like that would exist. Maybe in some labs that provide the source of
> global timekeeping?
> 
> > Compared to 5,000,000 Hz in error from rounding.
> 
> Huh?

He's pointing out that the design as specified passes the clock
frequency to the user space library in terms of integer MHz.  The
standard Ethernet clock frequency is 312.5MHz.  That .5MHz, or
500,000Hz, must be rounded off as it is passed from the kernel to the
user space library.  And that 500,000 cycle per second error in the
stated speed of the clock is *way* larger than the +- error variance in
the clocks you are using.  If you are having problems keeping your time
numbers synchronized, then this is likely a bigger problem than the
variance of the clocks.

> > So no, I disagree that rough is fine for anything.
> 
> I am sorry but the practical issues that we are dealing with in
> timekeeping today shows just the opposite. For a true comparison of clocks
> with nanosecond accuracy you would need time corrected values and that is
> a challenge due to the variances of the clocks that we see.

Jason's point, and one that isn't addressed yet, is that this might not
be variance in the clocks and instead might be a design flaw in the API
you are using and the way the clock speeds are passed to user space.
Changing from int MHz to int KHz might solve your problem.


-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
              GPG KeyID: 0E572FDD


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2015-06-06 15:45 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-31 12:14 [PATCH for-next V2 0/9] Add completion timestamping support Or Gerlitz
     [not found] ` <1433074457-26437-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-05-31 12:14   ` [PATCH for-next V2 1/9] IB/core: Change provider's API of create_cq to be extendible Or Gerlitz
     [not found]     ` <1433074457-26437-2-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-01  9:21       ` Devesh Sharma
2015-06-01 17:00       ` Jason Gunthorpe
2015-05-31 12:14   ` [PATCH for-next V2 2/9] IB/core: Change ib_create_cq to use struct ib_cq_init_attr Or Gerlitz
     [not found]     ` <1433074457-26437-3-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-01 16:53       ` Jason Gunthorpe
     [not found]         ` <20150601165335.GB14391-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-02  7:29           ` Matan Barak
     [not found]             ` <CAAKD3BAyNpEKwM7xu=LzFo2F=qP=EN9ZteL2yyAgBVuPNmvtqA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-02 17:27               ` Jason Gunthorpe
     [not found]                 ` <20150602172711.GB17776-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-03  9:04                   ` Matan Barak
     [not found]                     ` <CAAKD3BA7ZD4Gx5c16Ak+0_64rzazw+7n4frkuKHyrvdT=8ac6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-03 16:02                       ` Jason Gunthorpe
2015-05-31 12:14   ` [PATCH for-next V2 3/9] IB/core: Add CQ creation time-stamping flag Or Gerlitz
2015-05-31 12:14   ` [PATCH for-next V2 4/9] IB/core: Extend ib_uverbs_create_cq Or Gerlitz
2015-05-31 12:14   ` [PATCH for-next V2 5/9] IB/core: Add timestamp_mask and hca_core_clock to query_device Or Gerlitz
2015-05-31 12:14   ` [PATCH for-next V2 6/9] IB/core: Pass hardware specific data in query_device Or Gerlitz
     [not found]     ` <1433074457-26437-7-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-01  9:24       ` Devesh Sharma
2015-05-31 12:14   ` [PATCH for-next V2 7/9] IB/mlx4: Add mmap call to map the hardware clock Or Gerlitz
2015-05-31 12:14   ` [PATCH for-next V2 8/9] IB/mlx4: Support extended create_cq and query_device uverbs Or Gerlitz
     [not found]     ` <1433074457-26437-9-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-01 16:56       ` Jason Gunthorpe
     [not found]         ` <20150601165649.GC14391-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-02  7:21           ` Matan Barak
     [not found]             ` <CAAKD3BBsTFYKwOBK+6u04x6deRYzjYESJzbpyy83UtoChZhpOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-02 17:07               ` Jason Gunthorpe
     [not found]                 ` <20150602170736.GA17776-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-03  8:57                   ` Matan Barak
     [not found]                     ` <CAAKD3BARPocK1zZ2nYV0xWHqEASJTYbp1aQxwymi-TYTyK_vGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-03 16:31                       ` Jason Gunthorpe
     [not found]                         ` <20150603163146.GD12073-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-03 18:58                           ` Or Gerlitz
     [not found]                             ` <CAJ3xEMhGdX-35WAjauKZE7+Wg39kbXP35UzYX33J6OB8g_9rYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-03 19:16                               ` Jason Gunthorpe
     [not found]                                 ` <20150603191609.GB7902-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-03 19:35                                   ` Or Gerlitz
     [not found]                                     ` <CAJ3xEMiPkxf_Qu40AozMRWZaY-dAfEyAOZGyT9VYsNpQO1Q-Zw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-03 20:38                                       ` Jason Gunthorpe
2015-05-31 12:14   ` [PATCH for-next V2 9/9] IB/mlx4: Add support for CQ time-stamping Or Gerlitz
2015-05-31 12:31   ` [PATCH for-next V2 0/9] Add completion timestamping support Or Gerlitz
2015-05-31 19:00   ` Doug Ledford
     [not found]     ` <1433098827.114391.179.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-01  9:30       ` Matan Barak
     [not found]         ` <CAAKD3BBo9A5AV9Uv-q1TgSQ6hs-oSUn5QsUT+5+6mk1RwW7AUA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-01 11:25           ` Doug Ledford
     [not found]             ` <1433157904.114391.188.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-01 13:58               ` Christoph Lameter
     [not found]                 ` <alpine.DEB.2.11.1506010852360.26845-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2015-06-01 16:39                   ` Doug Ledford
2015-06-01 16:43               ` Jason Gunthorpe
     [not found]                 ` <20150601164322.GA14391-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-01 17:00                   ` Doug Ledford
     [not found]                     ` <1433178057.114391.208.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-01 17:29                       ` Jason Gunthorpe
2015-06-02 14:35                   ` Doug Ledford
     [not found]                     ` <1433255724.114391.225.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-02 14:44                       ` Or Gerlitz
     [not found]                         ` <556DC167.5070205-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-02 14:53                           ` Doug Ledford
2015-06-02 18:08                       ` Jason Gunthorpe
     [not found]                         ` <20150602180844.GD17776-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-02 18:51                           ` Doug Ledford
     [not found]                             ` <1433271083.40123.1.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-02 19:04                               ` Jason Gunthorpe
     [not found]                                 ` <20150602190410.GA23362-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-02 19:56                                   ` Doug Ledford
2015-06-03 19:48                           ` Or Gerlitz
     [not found]                             ` <CAJ3xEMjZqwJC8=HrMBv_eSVKVtLW7qjVZNjtuD28octGPtYu6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-03 20:46                               ` Jason Gunthorpe
     [not found]                                 ` <20150603204633.GE7902-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-04  0:55                                   ` Christoph Lameter
     [not found]                                     ` <alpine.DEB.2.11.1506031953500.11879-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2015-06-04  4:25                                       ` Jason Gunthorpe
     [not found]                                         ` <20150604042540.GA8837-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-06  8:16                                           ` Christoph Lameter
     [not found]                                             ` <alpine.DEB.2.11.1506060304480.29634-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2015-06-06 15:45                                               ` Doug Ledford [this message]
     [not found]                                                 ` <1433605546.40123.217.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-06 20:25                                                   ` Or Gerlitz
2015-06-07  4:42                                                   ` Jason Gunthorpe
2015-06-07  4:49                                                   ` Christoph Lameter
2015-06-04 16:17                           ` Hefty, Sean
     [not found]                             ` <1828884A29C6694DAF28B7E6B8A82373A8FE4F16-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-06-04 16:47                               ` Jason Gunthorpe
     [not found]                                 ` <20150604164759.GC27699-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-04 17:24                                   ` Hefty, Sean
     [not found]                                     ` <1828884A29C6694DAF28B7E6B8A82373A8FE4F98-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-06-06  8:27                                       ` Christoph Lameter
     [not found]                                         ` <alpine.DEB.2.11.1506060318570.29860-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2015-06-08 16:40                                           ` Hefty, Sean
     [not found]                                             ` <1828884A29C6694DAF28B7E6B8A82373A8FE5AB8-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-06-10  1:26                                               ` Christoph Lameter
     [not found]                                                 ` <alpine.DEB.2.11.1506092018190.6681-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2015-06-10  8:45                                                   ` Or Gerlitz
     [not found]                                                     ` <5577F93F.9030405-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-10 23:54                                                       ` Doug Ledford
2015-06-10 16:04                                                   ` Hefty, Sean
     [not found]                                                     ` <1828884A29C6694DAF28B7E6B8A82373A8FE6746-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-06-11 15:24                                                       ` Christoph Lameter
     [not found]                                                         ` <alpine.DEB.2.11.1506111010580.18426-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2015-06-11 19:48                                                           ` Hefty, Sean
2015-06-04 17:30                               ` Doug Ledford

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=1433605546.40123.217.camel@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
    --cc=gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matanb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.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 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.