From nobody Thu Aug 18 12:39:38 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M7kwp2THMz4ZPpB; Thu, 18 Aug 2022 12:39:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M7kwp21hBz3pbr; Thu, 18 Aug 2022 12:39:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660826378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fDdIGf/cdJX4tHNzsFqjigp3Xwr4q3UnM0Adx29OJ94=; b=o1CVR7lTkZybOEO7dskMzAIsOf08XpEG5sx20ZD3qKTzOk9fC2dta9s3otW+0Uf2Z7nsIr 3ZrO4tGiwHMP6sDMI+A2JjjdHfFaQp1kX1kNRaDIZ+bldDoIt36u4B//J75ovd+AExj+8O 3MbPopC60Uak9XpHlmSd8jHOjphov2DHaIyGdKScHaqaLSZLfjj1Gx+5nJ90aAb/CeOAPW uZLx6ZnYsuTuhSCvF/QjA1X2pUX3SRM+8g9T1ttu7ALkk9TatrVksGE15snIHYTQ5qH7Gc dZbMNrwCe6FDNlibLQWb6o9o06pmwkvMe0Dck4ryjcdr+uW6eQaRrOjt0jSktw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M7kwp15nbz1SQ4; Thu, 18 Aug 2022 12:39:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27ICdckK012228; Thu, 18 Aug 2022 12:39:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27ICdcMu012227; Thu, 18 Aug 2022 12:39:38 GMT (envelope-from git) Date: Thu, 18 Aug 2022 12:39:38 GMT Message-Id: <202208181239.27ICdcMu012227@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 6ecf086d5a0c - stable/13 - altq: improve pfctl config time for large numbers of queues List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6ecf086d5a0cdb2f1a13a6227a11b6548223e488 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660826378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fDdIGf/cdJX4tHNzsFqjigp3Xwr4q3UnM0Adx29OJ94=; b=sUbcU1fCorKUN0i1/UNhj/lx3a56YR7nMY1IXWo292Sc75cuFl8nvyVqxal30ZNgecipQB 9NSwFG08q5o4AD6VNy0LPfD4p0DqUKMPF7FiNxVAb15aR23EtM+fw+tVFzfQEbHCoMi5qM NB7ikN5jWA7LC68OOitEZ0NZRoVZln3WgbvSlqtD+XgMc4O/dHQy00R4y/WlOcXNPOIqsu iHNK/Q6bshzqrtpPxZ82C+Vpb2sCSx6//+QEKdXB9uDrr4Kem+3J5LBCIVljXLsFytb0qK nwMj4Ms6NAzOvkL8AjfNNo/OWKlDn1VH175KUQ6mZKEL61h2INHSENO0qKTPXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660826378; a=rsa-sha256; cv=none; b=A/KW5N9fLY42OZxrOAtbSl2S2P1wr6PuZofH/sKxqf2NeLdZFZuUUfogC+LxSnfa/7uIaJ dn07tloK3bHf4HcRFm4/oPYssvRyzUKfDen9hBlhxtEd2pIFJP1C93Z2F6ErYcLW1W06qo 24O8OuE7cdScTDsYs26CRDWqIx967iNdAh51LrEuokvQytWMbwVRM73GmlV16Fnce0czm/ xGmgiy56mogxTlpmTuiRNWk7FBnLOCRGC2pdvvM1XedaeZ1hGKIP6yZ6Fz5prctBNZzeMQ 24RBHbi5xaRBbKjzZWHjrm+1T6ycZl9bjIP4uFeekDbB8xQq7kfLEUQ0oG/nUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6ecf086d5a0cdb2f1a13a6227a11b6548223e488 commit 6ecf086d5a0cdb2f1a13a6227a11b6548223e488 Author: James Skon AuthorDate: 2022-07-28 19:58:31 +0000 Commit: Kristof Provost CommitDate: 2022-08-18 07:12:13 +0000 altq: improve pfctl config time for large numbers of queues In the current implementation of altq_hfsc.c, whne new queues are being added (by pfctl), each queue is added to the tail of the siblings linked list under the parent queue. On a system with many queues (50,000+) this leads to very long load times at the insertion process must scan the entire list for every new queue, Since this list is unordered, this changes merely adds the new queue to the head of the list rather than the tail. Reviewed by: kp MFC after: 3 weeks Sponsored by: RG Nets Differential Revision: https://reviews.freebsd.org/D35964 (cherry picked from commit 13890d30f8b215b84800cce3f161ad5148c82c00) --- sys/net/altq/altq_hfsc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/altq/altq_hfsc.c b/sys/net/altq/altq_hfsc.c index 2dbf571cdbb9..0d15b903cd64 100644 --- a/sys/net/altq/altq_hfsc.c +++ b/sys/net/altq/altq_hfsc.c @@ -514,9 +514,9 @@ hfsc_class_create(struct hfsc_if *hif, struct service_curve *rsc, if ((p = parent->cl_children) == NULL) parent->cl_children = cl; else { - while (p->cl_siblings != NULL) - p = p->cl_siblings; - p->cl_siblings = cl; + /* Put new class at beginning of list */ + cl->cl_siblings = parent->cl_children; + parent->cl_children = cl; } } IFQ_UNLOCK(hif->hif_ifq);