netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jeremy Harris <jeharris@redhat.com>
Cc: netdev@vger.kernel.org
Subject: Re: [RFC PATCH net-next 0/7] NIC driver Rx ring ECN
Date: Thu, 12 Jan 2023 16:09:00 -0800	[thread overview]
Message-ID: <20230112160900.5fdb5b20@kernel.org> (raw)
In-Reply-To: <2ff79a56-bf32-731b-a6ab-94654b8a3b31@redhat.com>

On Thu, 12 Jan 2023 14:06:50 +0000 Jeremy Harris wrote:
> On 11/01/2023 18:46, Jakub Kicinski wrote:
> > Do you have any reason to believe that it actually helps anything?  
> 
> I've not measured actual drop-rates, no.
> 
> > NAPI with typical budget of 64 is easily exhausted (you just need
> > two TSO frames arriving at once with 1500 MTU).  
> 
> I see typical systems with 300, not 64

Say more? I thought you were going by NAPI budget which should be 64
in bnx2x.

> - but it's a valid point.
> It's not the right measurement to try to control.
> Perhaps I should work harder to locate the ring size within
> the bnx2 and bnx2x drivers.

Perhaps the older devices give you some extra information here.
Normally on the Rx path you don't know how long the queue is,
you just check whether the next descriptor has been filled or not.
"Looking ahead" may be costly because you're accessing the same 
memory as the device.

> If I managed that (it being already the case for the xgene example)
> would your opinions change?

It may be cool if we can retrofit some second-order signal into 
the time-based machinery. The problem is that we don't actually 
have any time-based machinery upstream, yet :(
And designing interfaces for a decade-old HW seems shortsighted.

> > Host level congestion is better detected using time / latency signals.
> > Timestamp the packet at the NIC and compare the Rx time to current time
> > when processing by the driver.
> > 
> > Google search "Google Swift congestion control".  
> 
> Nice, but
> - requires we wait for timestamping-NICs

Grep for HWTSTAMP_FILTER_ALL, there's HW out there.

> - does not address Rx drops due to Rx ring-buffer overflow

It's a stronger signal than "continuous run of packets".
You can have a standing queue of 2 packets, and keep processing 
for ever. There's no congestion, or overload. You'd see that 
timestamps are recent.

I experimented last year with implementing CoDel on the input queues,
worked pretty well (scroll down ~half way):

https://developers.facebook.com/blog/post/2022/04/25/investigating-tcp-self-throttling-triggered-overload/

  reply	other threads:[~2023-01-13  0:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 14:34 [RFC PATCH net-next 0/7] NIC driver Rx ring ECN jgh
2023-01-11 14:34 ` [RFC PATCH 1/7] net: NIC driver Rx ring ECN: skbuff and tcp support jgh
2023-01-11 14:34 ` [RFC PATCH 2/7] net: NIC driver Rx ring ECN: stats counter jgh
2023-01-11 14:34 ` [RFC PATCH 3/7] drivers: net: xgene: NIC driver Rx ring ECN jgh
2023-01-11 14:34 ` [RFC PATCH 4/7] drivers: net: bnx2x: " jgh
2023-01-11 14:34 ` [RFC PATCH 5/7] " jgh
2023-01-11 14:34 ` [RFC PATCH 6/7] drivers: net: bnx2: " jgh
2023-01-11 14:34 ` [RFC PATCH 7/7] " jgh
2023-01-11 18:46 ` [RFC PATCH net-next 0/7] " Jakub Kicinski
2023-01-12 14:06   ` Jeremy Harris
2023-01-13  0:09     ` Jakub Kicinski [this message]
2023-01-19 17:05       ` Jeremy Harris
2023-01-19 17:20         ` Jakub Kicinski

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=20230112160900.5fdb5b20@kernel.org \
    --to=kuba@kernel.org \
    --cc=jeharris@redhat.com \
    --cc=netdev@vger.kernel.org \
    /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).