All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: min.li.xe@renesas.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 1/2] ptp: idt82p33: optimize idt82p33_adjtime
Date: Wed, 23 Jun 2021 20:40:26 -0700	[thread overview]
Message-ID: <20210624034026.GA6853@hoboy.vegasvil.org> (raw)
In-Reply-To: <1624459585-31233-1-git-send-email-min.li.xe@renesas.com>

On Wed, Jun 23, 2021 at 10:46:24AM -0400, min.li.xe@renesas.com wrote:
> From: Min Li <min.li.xe@renesas.com>
> 
> The current adjtime implementation is read-modify-write and immediately
> triggered, which is not accurate due to slow i2c bus access. Therefore,
> we will use internally generated 1 PPS pulse as trigger, which will
> improve adjtime accuracy significantly. On the other hand, the new trigger
> will not change TOD immediately but delay it to the next 1 PPS pulse.

Delaying the adjustment by one second (in the worst case) will cause
problems.  User space expects the adjustment to happen before the call
to adjtimex() returns.

In the case of PTP, if new Sync messages arrive before the delayed
adjustment completes, there will be a HUGE offset error, and that will
hurt the PI servo.

So it is better to accept a less accurate jump then to delay the
adjustment.

Thanks,
Richard

  parent reply	other threads:[~2021-06-24  3:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 14:46 [PATCH net 1/2] ptp: idt82p33: optimize idt82p33_adjtime min.li.xe
2021-06-23 14:46 ` [PATCH net 2/2] ptp: idt82p33: implement double dco time correction min.li.xe
2021-06-24  3:43   ` Richard Cochran
2021-06-24 14:40     ` Min Li
2021-06-24 16:15       ` Richard Cochran
2021-06-24  3:40 ` Richard Cochran [this message]
2021-06-24 14:38   ` [PATCH net 1/2] ptp: idt82p33: optimize idt82p33_adjtime Min Li
2021-06-24 16:14     ` Richard Cochran
2021-06-24 16:20     ` Richard Cochran
2021-06-25 14:24       ` Min Li
2021-06-25 16:20         ` Richard Cochran
2021-07-12 14:00           ` Min Li

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=20210624034026.GA6853@hoboy.vegasvil.org \
    --to=richardcochran@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=min.li.xe@renesas.com \
    --cc=netdev@vger.kernel.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.