From nobody Thu Jul 28 20:11:47 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 4Lv1yC4XdNz4Xmk3; Thu, 28 Jul 2022 20:11:47 +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 4Lv1yC3lyWz3kxw; Thu, 28 Jul 2022 20:11:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659039107; 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=L/fP18CVn3U7lVqa7jRTNgjwu1rOlMXN4lypiKNKbGU=; b=yMdGFStE9ypboaRHpMAYBh4tBzJP/EkNjycPlbZ20YaBNiOOKnladoxxkpNIk8sq6XX3tt 5W+FtrOWvPw7KZb+5kwGhh9CAAPLhWaT+VZspQ+BhC1+Ufgs04Tyg0Je4WDxKVMqPZVMXs YJuzJ+o1AC476qzJeG0PVjFlQNm4TvlQ6lL/trf9d0x/U4qsS6W5NVSJJaZa8vX5FE4pPQ RMSgVekeJw+kNYAvm6LWSxvaZXjEBglOxBfCLBJtG/o5ELGGTn1yvR17AA60R+B47vjgxD 4cwBFqp9Fx/H5FL010jTKMwKczw7QdMasKsB0TsD/Nu8jenRgFRRDLSrGksSOA== 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 4Lv1yC2sJLz18C7; Thu, 28 Jul 2022 20:11:47 +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 26SKBldR088784; Thu, 28 Jul 2022 20:11:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26SKBl4V088783; Thu, 28 Jul 2022 20:11:47 GMT (envelope-from git) Date: Thu, 28 Jul 2022 20:11:47 GMT Message-Id: <202207282011.26SKBl4V088783@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 13890d30f8b2 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 13890d30f8b215b84800cce3f161ad5148c82c00 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659039107; 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=L/fP18CVn3U7lVqa7jRTNgjwu1rOlMXN4lypiKNKbGU=; b=KOg/C0aB58EDaPLPoqUwsSsnIWL0Cs3Kcm2JvWN4Sh0p2gvq59vrZrUNBgaLiKt7GbO8/v j87FKOqX3ZRm5cBywLJnUm+8uU7rQv9kC2ldYMwJwxP6LTJT5a0JaPrrX8l8TMgBhler6f hgS5xH8AQIOPqyR+2jaMEYCrEtyOGpBoj0RIOSgt7Risk691rmuGdyY6RCH9Pf6r1fdiVa MiUZugYB5GlsCLZtlZBvoH/uX8xg6TTJyyFKRrU52PKhXtylXsE+TZSPaIlVi7RwgQhYnW hHzQ8KMs5qpd9RuN7Mf0gCJRgAKekwd7eCk67skobrWAmVVu+OZc0eI6QE3LJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659039107; a=rsa-sha256; cv=none; b=uIP10pun//QdOQwgbNmUQXkZQ6yrO+vMrr1ICiTegJjHiduK60dKhhU1XL24xfIAv5kGUN oWZC+GdQQnnxwmdKn6aGJGqz+kFarhjK9PbWhbx8dEaQopYCz/15fruHISoL+dEdWbw25V m9wYtx3xpJN68UBWsnRq/MMo21hT0No05iSbqUaps+IJahpE60NgRJ9e39x3mcLpF/9EhL 5cyIUhfu99fpdAZXe7ONgcp3or9l07Jnhle2aXjNa5gn0m0w5//KVgQVYQQfSqS+Vu1AJa ayQzeqRRV3yagoXNeYcTcwyOiGCT4/tjnvXvtBlg+Vpu1GbXx5cz3aQJVeBhXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=13890d30f8b215b84800cce3f161ad5148c82c00 commit 13890d30f8b215b84800cce3f161ad5148c82c00 Author: James Skon AuthorDate: 2022-07-28 19:58:31 +0000 Commit: Kristof Provost CommitDate: 2022-07-28 20:00:07 +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 --- 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 c3e84b345509..5551ad1313e4 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);