netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kurt Kanzenbach <kurt@linutronix.de>
To: Miroslav Lichvar <mlichvar@redhat.com>
Cc: Jacob Keller <jacob.e.keller@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Vinicius Costa Gomes <vinicius.gomes@intel.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-next] igb: Retrieve Tx timestamp directly from interrupt
Date: Thu, 21 Aug 2025 16:08:02 +0200	[thread overview]
Message-ID: <87cy8ooji5.fsf@jax.kurt.home> (raw)
In-Reply-To: <aKcYFbzbbfPXlrlN@localhost>

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

On Thu Aug 21 2025, Miroslav Lichvar wrote:
> On Thu, Aug 21, 2025 at 01:38:44PM +0200, Kurt Kanzenbach wrote:
>> On Wed Aug 20 2025, Jacob Keller wrote:
>> > On 8/20/2025 12:56 AM, Miroslav Lichvar wrote:
>> >> But when I increase the rate to 200000, I get this:
>> >> 
>> >> Without the patch:
>> >> NTP daemon TX timestamps   : 35835
>> >> NTP kernel TX timestamps   : 1410956
>> >> NTP hardware TX timestamps : 581575            
>> >> 
>> >> With the patch:
>> >> NTP daemon TX timestamps   : 476908
>> >> NTP kernel TX timestamps   : 646146
>> >> NTP hardware TX timestamps : 412095
>
>> Miroslav, can you test the following patch? Does this help?
>
> It seems better than with the original patch, but not as good as
> before, at least in the tests I'm doing. The maximum packet rate the
> server can handle is now only about 5% worse (instead of 40%), but the
> the number of missing timestamps on the server still seems high.
>
> With the new patch at 200000 requests per second:
> NTP daemon TX timestamps   : 192404
> NTP kernel TX timestamps   : 1318971
> NTP hardware TX timestamps : 418805
>
> I didn't try to adjust the aux worker priority.

Here's what I can see in the traces: In the current implementation, the
kworker runs directly after the IRQ on the *same* CPU. With the AUX
worker approach the kthread can be freely distributed to any other
CPU. This in turn involves remote wakeups etc.

You could try to pin the PTP AUX worker (e.g. called ptp0) with taskset
to the same CPU where the TS IRQs are processed. That might help to get
the old behavior back. Adjusting the priority is not necessary, both the
kworker and AUX thread run with 120 (SCHED_OTHER, nice value 0) by
default.

Thanks,
Kurt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2025-08-21 14:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-15  6:50 [PATCH iwl-next] igb: Retrieve Tx timestamp directly from interrupt Kurt Kanzenbach
2025-08-15  7:55 ` [Intel-wired-lan] " Paul Menzel
2025-08-15  8:10   ` Sebastian Andrzej Siewior
2025-08-15  8:17   ` Kurt Kanzenbach
2025-08-15 12:54     ` Paul Menzel
2025-08-15 16:41       ` Sebastian Andrzej Siewior
2025-08-15 13:58     ` Vadim Fedorenko
2025-08-16  9:06       ` Kurt Kanzenbach
2025-08-18 12:24 ` Miroslav Lichvar
2025-08-19  6:09   ` Kurt Kanzenbach
2025-08-19 14:50   ` Kurt Kanzenbach
2025-08-20  6:54     ` Miroslav Lichvar
2025-08-19 23:31   ` Jacob Keller
2025-08-20  7:56     ` Miroslav Lichvar
2025-08-20 20:29       ` Jacob Keller
2025-08-21  7:50         ` Miroslav Lichvar
2025-08-21 11:38         ` Kurt Kanzenbach
2025-08-21 12:59           ` Miroslav Lichvar
2025-08-21 14:08             ` Kurt Kanzenbach [this message]
2025-08-21 14:51               ` Miroslav Lichvar
2025-08-19 23:24 ` Jacob Keller

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=87cy8ooji5.fsf@jax.kurt.home \
    --to=kurt@linutronix.de \
    --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=kuba@kernel.org \
    --cc=mlichvar@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=richardcochran@gmail.com \
    --cc=vinicius.gomes@intel.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).