All of lore.kernel.org
 help / color / mirror / Atom feed
From: Asad Sajjad Ahmed <asadsa@ifi.uio.no>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev <netdev@vger.kernel.org>,
	"Eric Dumazet" <edumazet@google.com>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>,
	"Neal Cardwell" <ncardwell@google.com>,
	"Ingemar Johansson S" <ingemar.s.johansson@ericsson.com>,
	"Tom Henderson" <tomh@tomh.org>,
	"Bob Briscoe" <research@bobbriscoe.net>,
	"Asad Sajjad Ahmed" <asadsa@ifi.uio.no>,
	"Olga Albisser" <olga@albisser.org>
Subject: [PATCH net-next] fq_codel: avoid under-utilization with ce_threshold at low link rates
Date: Thu, 28 Oct 2021 21:15:00 +0200	[thread overview]
Message-ID: <20211028191500.47377-1-asadsa@ifi.uio.no> (raw)

Commit "fq_codel: generalise ce_threshold marking for subset of traffic"
[1] enables ce_threshold to be used in the Internet, not just in data
centres.

Because ce_threshold is in time units, it can cause poor utilization at
low link rates when it represents <1 packet.
E.g., if link rate <12Mb/s ce_threshold=1ms is <1500B packet.

So, suppress ECN marking unless the backlog is also > 1 MTU.

A similar patch to [1] was tested on an earlier kernel, and a similar
one-packet check prevented poor utilization at low link rates [2].

[1] commit dfcb63ce1de6 ("fq_codel: generalise ce_threshold marking for subset of traffic")

[2] See right hand column of plots at the end of:
https://bobbriscoe.net/projects/latency/dctth_journal_draft20190726.pdf

Signed-off-by: Asad Sajjad Ahmed <asadsa@ifi.uio.no>
Signed-off-by: Olga Albisser <olga@albisser.org>
---
 include/net/codel_impl.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/net/codel_impl.h b/include/net/codel_impl.h
index 137d40d8cbeb..4e3e8473e776 100644
--- a/include/net/codel_impl.h
+++ b/include/net/codel_impl.h
@@ -248,7 +248,8 @@ static struct sk_buff *codel_dequeue(void *ctx,
 						    vars->rec_inv_sqrt);
 	}
 end:
-	if (skb && codel_time_after(vars->ldelay, params->ce_threshold)) {
+	if (skb && codel_time_after(vars->ldelay, params->ce_threshold) &&
+	    *backlog > params->mtu) {
 		bool set_ce = true;
 
 		if (params->ce_threshold_mask) {
-- 
2.30.2


             reply	other threads:[~2021-10-28 19:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 19:15 Asad Sajjad Ahmed [this message]
2021-10-29 13:54 ` [PATCH net-next] fq_codel: avoid under-utilization with ce_threshold at low link rates Neal Cardwell
2021-10-29 14:53   ` Eric Dumazet
2021-10-29 14:57     ` Eric Dumazet
2021-10-31 20:31     ` Dave Taht
2021-10-31 20:34       ` Dave Taht
2021-10-31 21:50     ` Bob Briscoe

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=20211028191500.47377-1-asadsa@ifi.uio.no \
    --to=asadsa@ifi.uio.no \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=ingemar.s.johansson@ericsson.com \
    --cc=kuba@kernel.org \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=olga@albisser.org \
    --cc=research@bobbriscoe.net \
    --cc=toke@redhat.com \
    --cc=tomh@tomh.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 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.