From nobody Thu Aug 18 12:39:50 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 4M7kx22Rvxz4ZPmM; Thu, 18 Aug 2022 12:39:50 +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 4M7kx21nHtz3pbJ; Thu, 18 Aug 2022 12:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660826390; 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=VCbAzNnwX02/fsSZkpgq5hDAxLn4IvdEuXO7QWam+s4=; b=MeA8ESoJXNpshDXyGYWIOPSbaBI7v3AMAs+H6fQ/lOQGA8KyPgqNYZ9QrfePnJ01BbzrcW 9RPqqupy0X2ZQFbWacOiNVIY9HNWFtO4JetS4RFrHYpU3YNhBgzDwS26wqu0wUraDC98Z5 uJrRuh8BUIcZqXOzRiU3an63E1ya0184Z8oabogh6pdkDhkWHdr1DLLPPE9jLxaqva8uI9 DphAX+NVd/aG4PSARNcoZCThDX+N4owuIJe8i3qG7MrH9V33Zj3fihX3sSEGNavk5S9vxf lTlMJh9KV3kEu5vRmt109Q3J6xBNwtjbyfCRe2rpyhzPhia7m2+Aoq/syuRphQ== 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 4M7kx20rGWzF0h; Thu, 18 Aug 2022 12:39:50 +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 27ICdoH6012361; Thu, 18 Aug 2022 12:39:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27ICdoNr012360; Thu, 18 Aug 2022 12:39:50 GMT (envelope-from git) Date: Thu, 18 Aug 2022 12:39:50 GMT Message-Id: <202208181239.27ICdoNr012360@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: 51557e246432 - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: 51557e24643239b51af3297146c2d2e279ba1c1b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660826390; 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=VCbAzNnwX02/fsSZkpgq5hDAxLn4IvdEuXO7QWam+s4=; b=ZxAmBwhObEWcuqSrnwIUaL97v2CtboxWydVlq0F/fBu9HdkXWxo+Etq17lec73PpfU4HVe PomXIUEksdTDOTQRXzk4pYew0t0hFdKe1u0vyD/9NuTUad/gyVN6CkLjHRDM7CxCF1QZ7r MzWg869KNG/BU1NZFDUEQ4M+K5TwJ3yylTbZ6wf74jr2fT8Q3RcC9VVYaHLZB9sRwgWFLj bVAM5yBZjQ5BNqVBHYug8/QTtIYAeMuq5BToJLkFYZuDahWFFTeWGI1gxrD7MvbRxsOm0C 43w7Q+doMA00JAuWxcw5FGc8qaZ+ZHuAsQxzAxnancwZMvd3z15TFVCj/DCRiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660826390; a=rsa-sha256; cv=none; b=gWvJVNGVzNK9l908P9TnKI62zxbhakyYikbLFwzgAswoWdhne4wESi4hizUoDWB2AWF8Ic r0rCRUPzzcnGdmwex7SXW4J2LbcjBmN3aYOYXGM666k3vD9c2BeW2FhA6hgTwMBrPPbWXS 9HoR9fXhpBolGClVw+TKi8wRknml886fY7zs4pcH57lPv/3u8wE7eXSP9tcltvHtsMXpMj JIvYYm7KydcnpNbxyOeDNsXxQgAOvHaOs9AUNCAA7+DVQul5K0eGqVT9UUt5r+NaJNhcQG PTIFgTXLzUBaAijVBBzYf8CAvRnm5jseIvZhW8UjLh8IRTiqne60lfhCT4gNqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=51557e24643239b51af3297146c2d2e279ba1c1b commit 51557e24643239b51af3297146c2d2e279ba1c1b Author: James Skon AuthorDate: 2022-07-28 19:58:31 +0000 Commit: Kristof Provost CommitDate: 2022-08-18 07:12:17 +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 29b779a53b62..e387f629cacd 100644 --- a/sys/net/altq/altq_hfsc.c +++ b/sys/net/altq/altq_hfsc.c @@ -546,9 +546,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);