All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] fq_codel: avoid under-utilization with ce_threshold at low link rates
@ 2021-10-28 19:15 Asad Sajjad Ahmed
  2021-10-29 13:54 ` Neal Cardwell
  0 siblings, 1 reply; 7+ messages in thread
From: Asad Sajjad Ahmed @ 2021-10-28 19:15 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski
  Cc: netdev, Eric Dumazet, Toke Høiland-Jørgensen,
	Neal Cardwell, Ingemar Johansson S, Tom Henderson, Bob Briscoe,
	Asad Sajjad Ahmed, Olga Albisser

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-31 22:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 19:15 [PATCH net-next] fq_codel: avoid under-utilization with ce_threshold at low link rates Asad Sajjad Ahmed
2021-10-29 13:54 ` 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

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.