From nobody Wed Oct 13 20:10:06 2021 X-Original-To: dev-commits-src-branches@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 B1AEA1810977; Wed, 13 Oct 2021 20:10:07 +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 4HV3YC31gwz3vnD; Wed, 13 Oct 2021 20:10:07 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 18D6E2E145; Wed, 13 Oct 2021 20:10:07 +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 19DKA7os036658; Wed, 13 Oct 2021 20:10:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19DKA6MD036656; Wed, 13 Oct 2021 20:10:06 GMT (envelope-from git) Date: Wed, 13 Oct 2021 20:10:06 GMT Message-Id: <202110132010.19DKA6MD036656@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec Subject: git: 602f81ea50d5 - stable/13 - [fib_algo][dxr] Retire counters which are no longer used List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 602f81ea50d5456389fef22d4eb48192ac4e3050 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=602f81ea50d5456389fef22d4eb48192ac4e3050 commit 602f81ea50d5456389fef22d4eb48192ac4e3050 Author: Marko Zec AuthorDate: 2021-10-09 11:47:10 +0000 Commit: Marko Zec CommitDate: 2021-10-13 20:06:49 +0000 [fib_algo][dxr] Retire counters which are no longer used The number of chunks can still be tracked via vmstat -z|fgrep dxr. MFC after: 3 days --- sys/netinet/in_fib_dxr.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index d832a66ee2cc..f23db925444f 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -194,8 +194,6 @@ struct dxr_aux { uint32_t prefixes; uint32_t updates_low; uint32_t updates_high; - uint32_t all_chunks_cnt; - uint32_t unused_chunks_cnt; uint32_t unused_chunks_size; uint32_t xtbl_size; uint32_t all_trie_cnt; @@ -452,7 +450,6 @@ chunk_ref(struct dxr_aux *da, uint32_t chunk) size * sizeof(struct range_entry_long)); fdesc->base = cdp->cd_base; da->rtbl_top -= size; - da->unused_chunks_cnt--; da->unused_chunks_size -= cdp->cd_max_size; if (cdp->cd_max_size > size) { /* Split the range in two, need a new descriptor */ @@ -470,8 +467,6 @@ chunk_ref(struct dxr_aux *da, uint32_t chunk) LIST_INSERT_HEAD(&da->unused_chunks[i], empty_cdp, cd_hash_le); - da->all_chunks_cnt++; - da->unused_chunks_cnt++; da->unused_chunks_size += empty_cdp->cd_max_size; cdp->cd_max_size = size; } @@ -484,7 +479,6 @@ chunk_ref(struct dxr_aux *da, uint32_t chunk) cdp->cd_max_size = size; cdp->cd_base = fdesc->base; LIST_INSERT_HEAD(&da->all_chunks, cdp, cd_all_le); - da->all_chunks_cnt++; KASSERT(cdp->cd_base + cdp->cd_max_size == da->rtbl_top, ("dxr: %s %d", __FUNCTION__, __LINE__)); } @@ -538,7 +532,6 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) return; LIST_REMOVE(cdp, cd_hash_le); - da->unused_chunks_cnt++; da->unused_chunks_size += cdp->cd_max_size; cdp->cd_cur_size = 0; @@ -548,9 +541,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) KASSERT(cdp2->cd_base + cdp2->cd_max_size == cdp->cd_base, ("dxr: %s %d", __FUNCTION__, __LINE__)); LIST_REMOVE(cdp, cd_all_le); - da->all_chunks_cnt--; LIST_REMOVE(cdp2, cd_hash_le); - da->unused_chunks_cnt--; cdp2->cd_max_size += cdp->cd_max_size; uma_zfree(chunk_zone, cdp); cdp = cdp2; @@ -562,9 +553,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) KASSERT(cdp->cd_base + cdp->cd_max_size == cdp2->cd_base, ("dxr: %s %d", __FUNCTION__, __LINE__)); LIST_REMOVE(cdp, cd_all_le); - da->all_chunks_cnt--; LIST_REMOVE(cdp2, cd_hash_le); - da->unused_chunks_cnt--; cdp2->cd_max_size += cdp->cd_max_size; cdp2->cd_base = cdp->cd_base; uma_zfree(chunk_zone, cdp); @@ -575,8 +564,6 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) /* Free the chunk on the top of the range heap, trim the heap */ KASSERT(cdp == LIST_FIRST(&da->all_chunks), ("dxr: %s %d", __FUNCTION__, __LINE__)); - da->all_chunks_cnt--; - da->unused_chunks_cnt--; da->rtbl_top -= cdp->cd_max_size; da->unused_chunks_size -= cdp->cd_max_size; LIST_REMOVE(cdp, cd_all_le); @@ -945,7 +932,6 @@ range_build: } for (i = 0; i < UNUSED_BUCKETS; i++) LIST_INIT(&da->unused_chunks[i]); - da->all_chunks_cnt = da->unused_chunks_cnt = 0; da->unused_chunks_size = 0; da->rtbl_top = 0; da->updates_low = 0;