All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Vinicius Costa Gomes <vinicius.gomes@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Kurt Kanzenbach <kurt@linutronix.de>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org, Tony Nguyen <anthony.l.nguyen@intel.com>,
	intel-wired-lan@lists.osuosl.org,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2] igb: Convert Tx timestamping to PTP aux worker
Date: Tue, 26 Aug 2025 11:23:55 -0700	[thread overview]
Message-ID: <e656a4ee-281c-4205-9183-bc3c7dbc9173@intel.com> (raw)
In-Reply-To: <20250826125912.q0OhVCZJ@linutronix.de>


[-- Attachment #1.1: Type: text/plain, Size: 2956 bytes --]



On 8/26/2025 5:59 AM, Sebastian Andrzej Siewior wrote:
> On 2025-08-25 16:28:38 [-0700], Jacob Keller wrote:
>> Ya, I don't think we fully understand either. Miroslav said he tested on
>> I350 which is a different MAC from the I210, so it could be something
>> there. Theoretically we could handle just I210 directly in the interrupt
>> and leave the other variants to the kworker.. but I don't know how much
>> benefit we get from that. The data sheet for the I350 appears to have
>> more or less the same logic for Tx timestamps. It is significantly
>> different for Rx timestamps though.
> 
> From logical point of view it makes sense to retrieve the HW timestamp
> immediately when it becomes available and feed it to the stack. I can't
> imagine how delaying it to yet another thread improves the situation.
> The benchmark is about > 1k packets/ second while in reality you have
> less than 20 packets a second. With multiple applications you usually
> need a "second timestamp register" or you may lose packets.
> 
> Delaying it to the AUX worker makes sense for hardware which can't fire
> an interrupt and polling is the only option left. This is sane in this
> case but I don't like this solution as some kind compromise for
> everyone. Simply because it adds overhead and requires additional
> configuration.
> 

I agree. Its just frustrating that doing so appears to cause a
regression in at least one test setup on hardware which uses this method.

>>> Also I couldn't really see a performance degradation with ntpperf. In my
>>> tests the IRQ variant reached an equal or higher rate. But sometimes I
>>> get 'Could not send requests at rate X'. No idea what that means.
>>>
>>> Anyway, this patch is basically a compromise. It works for Miroslav and
>>> my use case.
>>>
>>>> This is also what the igc does and the performance improved
>>>> 	afa141583d827 ("igc: Retrieve TX timestamp during interrupt handling")
>>>>
>>
>> igc supports several hardware variations which are all a lot similar to
>> i210 than i350 is to i210 in igb. I could see this working fine for i210
>> if it works fine in igb.. I honestly am at a loss currently why i350 is
>> much worse.
>>
>>>> and here it causes the opposite?
>>>
>>> As said above, I'm out of ideas here.
>>>
>>
>> Same. It may be one of those things where the effort to dig up precisely
>> what has gone wrong is so large that it becomes not feasible relative to
>> the gain :(
> 
> Could we please use the direct retrieval/ submission for HW which
> supports it and fallback to the AUX worker (instead of the kworker) for
> HW which does not have an interrupt for it?
> 

I have no objection. Perhaps we could assume the high end of the ntpperf
benchmark is not reflective of normal use case? We *are* limited to only
one timestamp register, which the igb driver does protect by bitlock.

>>> Thanks,
>>> Kurt
> 
> Sebastian


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Jacob Keller <jacob.e.keller@intel.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Kurt Kanzenbach <kurt@linutronix.de>,
	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>,
	Paul Menzel <pmenzel@molgen.mpg.de>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Miroslav Lichvar <mlichvar@redhat.com>,
	<intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>
Subject: Re: [PATCH iwl-next v2] igb: Convert Tx timestamping to PTP aux worker
Date: Tue, 26 Aug 2025 11:23:55 -0700	[thread overview]
Message-ID: <e656a4ee-281c-4205-9183-bc3c7dbc9173@intel.com> (raw)
In-Reply-To: <20250826125912.q0OhVCZJ@linutronix.de>


[-- Attachment #1.1: Type: text/plain, Size: 2956 bytes --]



On 8/26/2025 5:59 AM, Sebastian Andrzej Siewior wrote:
> On 2025-08-25 16:28:38 [-0700], Jacob Keller wrote:
>> Ya, I don't think we fully understand either. Miroslav said he tested on
>> I350 which is a different MAC from the I210, so it could be something
>> there. Theoretically we could handle just I210 directly in the interrupt
>> and leave the other variants to the kworker.. but I don't know how much
>> benefit we get from that. The data sheet for the I350 appears to have
>> more or less the same logic for Tx timestamps. It is significantly
>> different for Rx timestamps though.
> 
> From logical point of view it makes sense to retrieve the HW timestamp
> immediately when it becomes available and feed it to the stack. I can't
> imagine how delaying it to yet another thread improves the situation.
> The benchmark is about > 1k packets/ second while in reality you have
> less than 20 packets a second. With multiple applications you usually
> need a "second timestamp register" or you may lose packets.
> 
> Delaying it to the AUX worker makes sense for hardware which can't fire
> an interrupt and polling is the only option left. This is sane in this
> case but I don't like this solution as some kind compromise for
> everyone. Simply because it adds overhead and requires additional
> configuration.
> 

I agree. Its just frustrating that doing so appears to cause a
regression in at least one test setup on hardware which uses this method.

>>> Also I couldn't really see a performance degradation with ntpperf. In my
>>> tests the IRQ variant reached an equal or higher rate. But sometimes I
>>> get 'Could not send requests at rate X'. No idea what that means.
>>>
>>> Anyway, this patch is basically a compromise. It works for Miroslav and
>>> my use case.
>>>
>>>> This is also what the igc does and the performance improved
>>>> 	afa141583d827 ("igc: Retrieve TX timestamp during interrupt handling")
>>>>
>>
>> igc supports several hardware variations which are all a lot similar to
>> i210 than i350 is to i210 in igb. I could see this working fine for i210
>> if it works fine in igb.. I honestly am at a loss currently why i350 is
>> much worse.
>>
>>>> and here it causes the opposite?
>>>
>>> As said above, I'm out of ideas here.
>>>
>>
>> Same. It may be one of those things where the effort to dig up precisely
>> what has gone wrong is so large that it becomes not feasible relative to
>> the gain :(
> 
> Could we please use the direct retrieval/ submission for HW which
> supports it and fallback to the AUX worker (instead of the kworker) for
> HW which does not have an interrupt for it?
> 

I have no objection. Perhaps we could assume the high end of the ntpperf
benchmark is not reflective of normal use case? We *are* limited to only
one timestamp register, which the igb driver does protect by bitlock.

>>> Thanks,
>>> Kurt
> 
> Sebastian


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  reply	other threads:[~2025-08-26 18:24 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22  7:28 [Intel-wired-lan] [PATCH iwl-next v2] igb: Convert Tx timestamping to PTP aux worker Kurt Kanzenbach
2025-08-22  7:28 ` Kurt Kanzenbach
2025-08-22  7:52 ` [Intel-wired-lan] " Sebastian Andrzej Siewior
2025-08-22  7:52   ` Sebastian Andrzej Siewior
2025-08-22 23:55   ` [Intel-wired-lan] " Jacob Keller
2025-08-22 23:55     ` Jacob Keller
2025-08-23  7:29   ` [Intel-wired-lan] " Kurt Kanzenbach
2025-08-23  7:29     ` Kurt Kanzenbach
2025-08-25  7:53     ` [Intel-wired-lan] " Miroslav Lichvar
2025-08-25  7:53       ` Miroslav Lichvar
2025-08-25  9:22       ` [Intel-wired-lan] " Kurt Kanzenbach
2025-08-25  9:22         ` Kurt Kanzenbach
2025-08-25 23:23         ` [Intel-wired-lan] " Jacob Keller
2025-08-25 23:28     ` Jacob Keller
2025-08-25 23:28       ` Jacob Keller
2025-08-26 12:59       ` [Intel-wired-lan] " Sebastian Andrzej Siewior
2025-08-26 12:59         ` Sebastian Andrzej Siewior
2025-08-26 18:23         ` Jacob Keller [this message]
2025-08-26 18:23           ` Jacob Keller
2025-08-27 12:57           ` [Intel-wired-lan] " Kurt Kanzenbach
2025-08-27 12:57             ` Kurt Kanzenbach
2025-08-27 13:39             ` [Intel-wired-lan] " Paul Menzel
2025-08-27 13:39               ` Paul Menzel
2025-08-27 16:22               ` [Intel-wired-lan] " Jacob Keller
2025-08-27 16:22                 ` Jacob Keller
2025-08-27 13:57         ` [Intel-wired-lan] " Miroslav Lichvar
2025-08-27 13:57           ` Miroslav Lichvar
2025-08-27 14:05           ` [Intel-wired-lan] " Kurt Kanzenbach
2025-08-27 14:05             ` Kurt Kanzenbach
2025-08-27 14:10           ` [Intel-wired-lan] " Sebastian Andrzej Siewior
2025-08-27 14:10             ` Sebastian Andrzej Siewior
2025-08-27 14:41             ` [Intel-wired-lan] " Miroslav Lichvar
2025-08-27 14:41               ` Miroslav Lichvar
2025-08-27 14:52               ` [Intel-wired-lan] " Sebastian Andrzej Siewior
2025-08-27 14:52                 ` Sebastian Andrzej Siewior
2025-08-27 16:21                 ` [Intel-wired-lan] " Jacob Keller
2025-08-27 16:21                   ` Jacob Keller
2025-08-22 16:27 ` [Intel-wired-lan] " Vadim Fedorenko
2025-08-22 16:27   ` Vadim Fedorenko
2025-08-23  7:44   ` [Intel-wired-lan] " Kurt Kanzenbach
2025-08-23  7:44     ` Kurt Kanzenbach
2025-08-25 13:18     ` [Intel-wired-lan] " Vadim Fedorenko
2025-08-25 13:18       ` Vadim Fedorenko
2025-08-25 23:24       ` [Intel-wired-lan] " Jacob Keller
2025-08-25 23:24         ` Jacob Keller
2025-08-25 10:58 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-08-25 10:58   ` Loktionov, Aleksandr

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=e656a4ee-281c-4205-9183-bc3c7dbc9173@intel.com \
    --to=jacob.e.keller@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=kuba@kernel.org \
    --cc=kurt@linutronix.de \
    --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 \
    /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.