public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: davem@davemloft.net, f.fainelli@gmail.com,
	vivien.didelot@gmail.com, andrew@lunn.ch, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: dsa: sja1105: poll for extts events from a timer
Date: Mon, 3 Aug 2020 11:26:31 -0700	[thread overview]
Message-ID: <20200803182631.GA28007@hoboy> (raw)
In-Reply-To: <20200803175158.579532-1-olteanv@gmail.com>

On Mon, Aug 03, 2020 at 08:51:58PM +0300, Vladimir Oltean wrote:
> The current poll interval is enough to ensure that rising and falling
> edge events are not lost for a 1 PPS signal with 50% duty cycle.

> Fix that by taking the following measures:
> - Schedule the poll from a timer. Because we are really scheduling the
>   timer periodically, the extts events delivered to user space are
>   periodic too, and don't suffer from the "shift-to-the-right" effect.
> - Increase the poll period to 6 times a second. This imposes a smaller
>   upper bound to the shift that can occur to the delivery time of extts
>   events, and makes user space (ts2phc) to always interpret correctly
>   which events should be skipped and which shouldn't.
> - Move the SPI readout itself to the main PTP kernel thread, instead of
>   the generic workqueue. This is because the timer runs in atomic
>   context, but is also better than before, because if needed, we can
>   chrt & taskset this kernel thread, to ensure it gets enough priority
>   under load.

Makes sense to me.

Acked-by: Richard Cochran <richardcochran@gmail.com>

  reply	other threads:[~2020-08-03 18:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-03 17:51 [PATCH net-next] net: dsa: sja1105: poll for extts events from a timer Vladimir Oltean
2020-08-03 18:26 ` Richard Cochran [this message]
2020-08-04  1:16 ` David Miller

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=20200803182631.GA28007@hoboy \
    --to=richardcochran@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@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