linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Min Li <min.li.xe@renesas.com>
To: Richard Cochran <richardcochran@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH net 1/2] ptp: idt82p33: optimize idt82p33_adjtime
Date: Thu, 24 Jun 2021 14:38:46 +0000	[thread overview]
Message-ID: <OS3PR01MB6593D3DCF7CE756E260548B3BA079@OS3PR01MB6593.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20210624034026.GA6853@hoboy.vegasvil.org>

> -----Original Message-----
> From: Richard Cochran <richardcochran@gmail.com>
> Sent: June 23, 2021 11:40 PM
> To: Min Li <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
> 
> 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

Hi Richard

Thanks for the review

For linuxptp/ptp4l, we can use step_window to adapt to the slow adjtime.

I have tested this change with ptp4l for by setting step_window to 48 (assuming 16 packets per second)
for both 8265.2/8275.1 and they performed well.

Min

  reply	other threads:[~2021-06-24 14:39 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 ` [PATCH net 1/2] ptp: idt82p33: optimize idt82p33_adjtime Richard Cochran
2021-06-24 14:38   ` Min Li [this message]
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=OS3PR01MB6593D3DCF7CE756E260548B3BA079@OS3PR01MB6593.jpnprd01.prod.outlook.com \
    --to=min.li.xe@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).