public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Kurt Kanzenbach <kurt@linutronix.de>
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Willem de Bruijn <willemb@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Loktionov, Aleksandr" <aleksandr.loktionov@intel.com>,
	"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
	"Kitszel, Przemyslaw" <przemyslaw.kitszel@intel.com>,
	Paul Menzel <pmenzel@molgen.mpg.de>,
	"Gomes, Vinicius" <vinicius.gomes@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Richard Cochran <richardcochran@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"Keller, Jacob E" <jacob.e.keller@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v3] igb: Retrieve Tx timestamp directly from interrupt for i210
Date: Wed, 11 Feb 2026 10:54:44 -0800	[thread overview]
Message-ID: <20260211105444.1e370abd@kernel.org> (raw)
In-Reply-To: <87qzqr5vos.fsf@jax.kurt.home>

On Wed, 11 Feb 2026 13:08:51 +0100 Kurt Kanzenbach wrote:
> On Tue Feb 10 2026, Willem de Bruijn wrote:
> > The core issue seems to be that the ptp_tx_work is not scheduled
> > quickly enough. I wonder if that is the issue to be fixed. When/why
> > is this too slow?  
> 
> The igb driver uses schedule_work() for the Tx timestamp retrieval. That
> means the ptp_tx_work item is queued to the kernel-global workqueue. In
> case there is load on the system, the kworker which handles ptp_tx_work
> might be delayed too much, which results in ptp4l timeouts.
> 
> Easy solution would be to tune the priority/affinity of the
> kworker. However, we have to figure which kworker it is. Furthermore,
> this kworker might handle other things as well, which are not related to
> igb timestamping at all. Therefore, tuning the priority of the kworker
> is not practical.
> 
> Moving the timestamping in IRQ looked like a good solution, because the
> device already signals that the Tx timestamp is available now. No need
> to schedule any worker/work at all. So, it'd be very nice if
> skb_tstamp_tx() could be called from IRQ context. BTW other drivers like
> igc call this function in IRQ context as well.
> 
> Alternative solution for igb is to move from schedule_work() to PTP AUX
> worker. That is a dedicated PTP worker thread called ptpX, which could
> handle the timestamping. This can be easily tuned with taskset and
> chrt. However, there's one difference to the kworker approach: The
> kworker always runs on the same CPU, where the IRQ triggered, the AUX
> worker not necessarily. This means, Miroslav needs to be aware of this
> and tune the AUX worker for his NTP use cases.
> 
> I hope, that makes the motivation for this patch and discussion clear.

Are you concerned about the latency of delivering the TS to the user
space app / socket? Or purely reading the TS out of the HW fifo to make
space for another packet to be timestamped?

  parent reply	other threads:[~2026-02-11 18:54 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05  7:54 [PATCH iwl-next v3] igb: Retrieve Tx timestamp directly from interrupt for i210 Kurt Kanzenbach
2026-02-05  9:47 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-02-05 10:03   ` Sebastian Andrzej Siewior
2026-02-05 10:37     ` Loktionov, Aleksandr
2026-02-05 10:52       ` Sebastian Andrzej Siewior
2026-02-05 11:56       ` Vadim Fedorenko
2026-02-05 14:51         ` Sebastian Andrzej Siewior
2026-02-05 16:27           ` Vadim Fedorenko
2026-02-05 16:43             ` Sebastian Andrzej Siewior
2026-02-05 16:48               ` Vadim Fedorenko
2026-02-05 21:41                 ` Willem de Bruijn
2026-02-06  7:44                   ` Sebastian Andrzej Siewior
2026-02-06 10:12                   ` Vadim Fedorenko
2026-02-08 16:25                     ` Willem de Bruijn
2026-02-09  9:06                       ` Sebastian Andrzej Siewior
2026-02-09 10:43                         ` Vadim Fedorenko
2026-02-09 11:48                           ` Sebastian Andrzej Siewior
2026-02-09 12:24                             ` Vadim Fedorenko
2026-02-09 12:46                               ` Willem de Bruijn
2026-02-10 12:12                                 ` Sebastian Andrzej Siewior
2026-02-10 16:14                                   ` Willem de Bruijn
2026-02-11 12:08                                     ` Kurt Kanzenbach
2026-02-11 16:29                                       ` Willem de Bruijn
2026-02-12 18:33                                         ` Sebastian Andrzej Siewior
2026-02-14 23:26                                         ` Sebastian Andrzej Siewior
2026-02-11 18:54                                       ` Jakub Kicinski [this message]
2026-02-12 16:28                                         ` Sebastian Andrzej Siewior
2026-02-11 19:29                                       ` Jacob Keller
2026-02-11 21:44                                         ` Jakub Kicinski
2026-02-12 16:47                                           ` Sebastian Andrzej Siewior
2026-02-05 11:58   ` Kurt Kanzenbach
2026-02-05 12:20     ` Loktionov, Aleksandr
2026-02-06  0:05       ` Jacob Keller
2026-02-05 12:12 ` Sebastian Andrzej Siewior

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=20260211105444.1e370abd@kernel.org \
    --to=kuba@kernel.org \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=kurt@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=richardcochran@gmail.com \
    --cc=vadim.fedorenko@linux.dev \
    --cc=vinicius.gomes@intel.com \
    --cc=willemb@google.com \
    --cc=willemdebruijn.kernel@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