🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #3740

[PATCH net-next v2 0/3] net/sched: bound the deficit-refill dequeue loops

#3740
From: Victor Nogueira
Date: Thu, 15 Oct 2026 21:18
38 lines
9218 bytes
DRR, ETS, sfq, fq, fq_codel and fq_pie refill the head entity one
quantum at a time until it can send. With a size table that inflates
packets to 1 MiB and a quantum of 256, one dequeue can loop millions of
times under the qdisc lock. This series skips the rounds in which
nothing can send, so a dequeue costs O(N).

1/3 fixes drr, ets and sfq.
2/3 fixes fq, fq_codel and fq_pie. There, a flow can still fail to send
after the skip (throttled or AQM drop), so a crafted setup can still be
slow.
3/3 adds DRR and ETS tests for the refill result and service order.

v1 -> v2:
- fq, fq_codel and fq_pie moved to their own patch (2/3)
- empty flows are credited and removed as the old loop would
- tests reworded, ETS case added
v1: https://lore.kernel.org/netdev/QDISC-TIAE.v1.20261008110502@mojatatu.com/

Victor Nogueira (3):
  net/sched: drr, ets, sfq: skip empty rounds in the deficit-refill
    dequeue loop
  net/sched: fq, fq_codel, fq_pie: skip empty rounds in the
    deficit-refill dequeue loop
  selftests: tc-testing: pin DRR and ETS deficit refill semantics

 net/sched/sch_drr.c                           | 42 +++++++++-
 net/sched/sch_ets.c                           | 41 +++++++++-
 net/sched/sch_fq.c                            | 81 +++++++++++++++++-
 net/sched/sch_fq_codel.c                      | 74 ++++++++++++++++-
 net/sched/sch_fq_pie.c                        | 68 ++++++++++++++-
 net/sched/sch_sfq.c                           | 41 +++++++++-
 .../tc-testing/tc-tests/qdiscs/drr.json       | 82 +++++++++++++++++++
 .../tc-testing/tc-tests/qdiscs/ets.json       | 54 ++++++++++++
 8 files changed, 475 insertions(+), 8 deletions(-)

-- 
2.43.0
Technical Details
Message-ID: <QDISC-TIAE.v2.r0.20261015163454@mojatatu.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346940-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346940-linux-kernel-netdev=dewy.ru
From: victor@mojatatu.com (Victor Nogueira)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v2 0/3] net/sched: bound the deficit-refill dequeue loops
Date: Thu, 15 Oct 2026 18:18:28 -0300
Organization: Usenet Network
Message-ID: <QDISC-TIAE.v2.r0.20261015163454@mojatatu.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2624131"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:lnEKp7xZ9s8abNRGLnvg5KgjvqY= sha256:Gm3ktvr7tFJ4utSkrJt4vKFQiXR3HiU3kxY+rEg2Ahw=
	sha1:sQRs3xWUGOguK5MN7R2YxhF3Rvs= sha256:jCEGHo4cSeGyTppd0EWFESw1JHGSUAuzECEZ/RCePEA=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 56FB5110038; Fri, 16 Oct 2026 00:19:07 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.75
X-Spam-Status: No, score=-0.75 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=mojatatu.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id me_78RYIXFRr;
	Fri, 16 Oct 2026 00:19:04 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-346940-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mojatatu.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 9733E11002E; Fri, 16 Oct 2026 00:18:55 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by tor.lore.kernel.org (Postfix) with ESMTP id B7CBF2DA55; Thu, 15 Oct 2026 21:18:53 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id DD53733993;
	Thu, 15 Oct 2026 21:18:52 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=mojatatu.com header.i=@mojatatu.com header.b="khN6W0OC"
X-Received: from mail-dy1-f182.google.com (mail-dy1-f182.google.com [74.125.82.182])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D109148422A
	for <netdev@vger.kernel.org>; Thu, 15 Oct 2026 21:18:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.182
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792099132; cv=none; b=WtMhdEX0Or02hg7nqgLZoK06HXVhTAP78APpi4rckB8kql9z9tl7Zv/PiRF3a9WSbZI6C98tlkUz5gC6KxF4yoQ2kA0OwRzYih9qLOT2ZuBf8bXtU6thNu6cqNfdQjDD3t44zOrhgcd06u6vT1cjnkaa8LZuD5Nwu8QQlGUWJ4c=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792099132; c=relaxed/simple;
	bh=/NFZ2tkWdLR9IJr//ybnRXFokS6ntcalDvGYdtTOepQ=;
	h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ph4AgV+FIeNusZB9qKDNQfc1p0iEOjDtZXh0lt+5YEsKpuHSBgUUeNgvbT3O6tHTHS8H7O/artq3DudXH2oQFBAYHlx5n9Fh8sVmQADwV1xwbXmFAAQvBdQwmaAaV9vx7a55ewrwGOhrU+WmHkrQu6WTsfvFkvEXoSBg8RwfIog=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mojatatu.com; spf=none smtp.mailfrom=mojatatu.com; dkim=pass (1024-bit key) header.d=mojatatu.com header.i=@mojatatu.com header.b=khN6W0OC; arc=none smtp.client-ip=74.125.82.182
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mojatatu.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=mojatatu.com
X-Received: by mail-dy1-f182.google.com with SMTP id 5a478bee46e88-30b6dad2382so13701894eec.0
        for <netdev@vger.kernel.org>; Thu, 15 Oct 2026 14:18:47 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=mojatatu.com; s=google; t=1792099127; x=1792703927; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
        bh=Fxx1tuoEAv/PlgxC62C7y+lSjrcK6Pozoo/S/YtYY78=;
        b=khN6W0OCEp1rzHQ9SUsFrbdYBu9bAh/3wxZV6VuEg1UnmC5JhJActmcc5hJohgyA/Q
         feLZaNO8/uP6SjY2KW0Urj7oUoMv287Vhh7fM0t5+3+adfH74Ef5e8w7ZJYPaibcQYbY
         R5KBmlNN3CpuJMqabLlvPyYlWkXJWjQ8em6fY=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792099127; x=1792703927;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=Fxx1tuoEAv/PlgxC62C7y+lSjrcK6Pozoo/S/YtYY78=;
        b=afD0wkgF9ZTss5ODUavcYx9nvRWJIEBwQd8BbL4vs7b8p9N4niezmUtOPVJN3flwNs
         y/ybJ2qLfjh5YejC9RzxOstK9jHipiPNZwUYTD/qUaDvczYBXgAfF6/7tqZpFiMpyZsE
         jOI0smeOddd8zPNGQGOJHc3U+xzXbN8W0y+Q/n9fjljU2G6GMkwkXHJ/0/J0SPPbI6Cl
         T5AwNsVrzWIsDzxVd3pwt7nc5xyDiK7hoOi7a7FtkgMSrfp4a21AaMpAmrkawaFnjkHS
         icLgKpfzPMGDo2Du4/F5wIfxWswcBJzN7aa4Ov30FbwK9l5WsIouk9bK4n7wL076L5Ec
         EV+A==
X-Forwarded-Encrypted: i=1; AKwUvBxLMW54KIT7hi4EcR3atTVFRyLsWHXIK2eOd0KxOmRdMp6zl+fTxjWA3mH9p0Zp6f7p/zDSEfY=@vger.kernel.org
X-Gm-Message-State: AFq9FYJlbuu7GjOGXg2BtUhXX+DOb1FLPS2246rduKscPHjSVN3vSyiH
	RjmoDb1wxtJq/3BSWSDS1UeLwkvBLcH5/N2jacvPapvjfgPiIi97dIyP77IoW+H2BICnQeVudhk
	m/uc=
X-Gm-Gg: AYBFou2I0TNiY9B6pSSnsRmgA838o+0JAUzENAuU89+M6UvlAd+HE57asAs4xdvqtkz
	GjIyX27gZucDr/ndotw5rwb868KnRjnHp9QQfPFeN6neS1bt4b0PwkWg0/75k18JQ7w5rjG+Z+6
	ABMEDMvp2JStb16SXuF4BNCXJgJfyF+3CjbiK6NUB5f8R3QxFs7BG4eq+tHOehT7vaemALM5Vql
	QMGMXCP7hAaCKWneSgtApL9cLCQAn1tOCvJg0pZYZ+IHZUActOKRm6w/IQLGL+zTVA1mQaf2Or3
	YwjdE2fJ1DG7fVchrdyC167XRQanSi3bUzuh3KvWpO/9PHhF4M0XQ3mfmnfOp/SHocewt66kfgz
	8khYqfLZ6lpqtZxO2+4XEg2CE2vTTNxVGckFp4zGEP5FYpapA9LdDXiIw1LjFhzBuUaCWvhwKdB
	bmKKLGfAEYvyelMArokaH4b9shlA5y9TU1FFQbh6Sxy8vMeaQD9S50lknzvO425MMwopY0NoCIJ
	RR4
X-Received: by 2002:a05:693c:8643:20b0:35e:fd8:3201 with SMTP id 5a478bee46e88-35e0fd83708mr8390127eec.14.1792099122700;
        Thu, 15 Oct 2026 14:18:42 -0700 (PDT)
X-Received: from exu-caveira.tail33bf8.ts.net ([2804:14d:5c54:4d67::2000])
        by smtp.gmail.com with ESMTPSA id a92af1059eb24-1831b859142sm216711c88.18.2026.10.15.14.18.38
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 15 Oct 2026 14:18:41 -0700 (PDT)
X-Cc: horms@kernel.org,
	sashiko-bot <sashiko-bot@kernel.org>,
	Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org
X-Mailer: git-send-email 2.55.0
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>