From nobody Tue Sep 23 16:16:07 2025 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 4cWQ8S2n53z68qV0; Tue, 23 Sep 2025 16:16:24 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWQ8S1LXTz3xSD; Tue, 23 Sep 2025 16:16:24 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758644184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BtIB1XvKFaKuqWIU6JbdRLjYa/652hNqtoR9/LyyhHw=; b=lKOHvPq8C99Gk30vjKIFStRN+ujosOmDZc1iLQowN4cZwIsSlOX9igB0ir9/TrLlE3LyTR CgL2bxyM2oUc2ZxA+naezD2FKr+WdhRzRVR9sgyHxKaSQpRW3PwMYgh5S80arw2QkHysUs ncoszomus7OQWpzCv9RONB6kJeqaYOxS7pgjm0mdD83c83jsBJISr9DSJfiia6nmLQ2pZ5 24J3pUfI3QrqLWwOeYFv199KrY+yAAP5pZf6fH0UIk/Ib8N4iEBhSfCpUpP+Zb66yMl/QZ R/34u5lTbsqnRTCFudV4NTU0WzRodbQKQElUrjQopmjByoxNkin0jFFz7/qoWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758644184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BtIB1XvKFaKuqWIU6JbdRLjYa/652hNqtoR9/LyyhHw=; b=ER3BCDbZn7w6VwYTs/nRYJKxdSnCtJ6kYKD6PtTcj3xEIC2lsH940bKxbKHC147+DvQGab eKHFa+2iYAknzI9+GGlirPl4zGbH7hgxE5wzwf7R7LiqgMyoNJX9MOaN8401AvilDFrDZI z2dM1BDYq4cUkQ4Fd/wKyFm3iUaz6FErMaPCA5yyuNbUH7vfOidWO+vx42fcHBdM+bYmH9 L+/Ib8/TuW9SBvMgDTNNd3cFQdsLDKD8U0v/odv3FGLY0Yl77hHGwvyOCrztc5KUPdNAD9 qWhQZJmtExbap93q1dWcaIHIhwQA9B7UUxPCjpn8yNHXaba0Sen6FpO3vDkz+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758644184; a=rsa-sha256; cv=none; b=OnqTg9yfPvz/puhCGBysFL2IXkIT0F3n8MlSyVaul/B31oueA5mrvCpKaOCDeC4SdN2Pqj 5gc+oCetvbKtmSmoTGM7FP5dxrGos7zUmHf2orUiFmZrJ1mdYaQ2iPtY/lx/28Tz8nqgga SHrnzadJ/aLbbIH0zGlI9HonXX2odbik5Sk5DPZqI955K2Pb3yd9Vo82bPqj5TRwSJT0Pq AmmFEG1QCYahzhSFDTHO2sy7srVWml6WGC9q+Iomc4TT0WwGti1wr3qwz9lECQS2fL2ydB f5QU8A3Z1XyujwB1T/4IF8c/nXygB4Y7mUErigRPv6924W5S/OFj1znfSFmB2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cWQ8N6VBbz1QtM; Tue, 23 Sep 2025 16:16:20 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Content-Type: text/plain; charset=utf-8 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: Re: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support From: Zhenlei Huang In-Reply-To: <6c318ff2-48af-4d8d-8f0f-eea629f42e62@FreeBSD.org> Date: Wed, 24 Sep 2025 00:16:07 +0800 Cc: "Jonathan T. Looney" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <6657C773-2A9B-4C76-BAAC-E3CCE69CA5D1@FreeBSD.org> References: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> <6c318ff2-48af-4d8d-8f0f-eea629f42e62@FreeBSD.org> To: Guido Falsi X-Mailer: Apple Mail (2.3696.120.41.1.10) > On Sep 23, 2025, at 11:48 PM, Guido Falsi = wrote: >=20 > On 9/23/25 17:27, Jonathan T. Looney wrote: >> On Mon, Sep 22, 2025 at 11:44=E2=80=AFAM Guido Falsi = > wrote: >> On 9/22/25 17:37, Jonathan T. Looney wrote: >> > This seems like it is probably a low-frequency event. If so, = why >> is a >> > counter a better choice for this than an atomic? >> > >> I used counters because they were already being used in the = netinet6 >> code, and are a good match for the use. >> What makes them a good match for the use? Counters are generally best = for write-often, read-rarely (by comparison) things, like statistics, = where we want to avoid contention in a often-used critical path. For = low-frequency events, the expense of keeping the counters (memory usage = multiplied by the number of cores; more difficult debugging; etc.) may = outweigh the benefits. >=20 > Maybe I explained myself poorly, I meant to say the structure already = uses counters and they work. Jonathan is not talking about the correctness but he hints it is = overkill to use a counter(9) for a rarely updated struct member. >=20 > It did not occur to me to use something different, but I see no = problem using a different tool, as long as it works and does not make = the logic more complex. An atomic(9) is sufficient, so you can eliminate alloc / free and the = code is shorter :) >=20 > --=20 > Guido Falsi >=20 Best regards, Zhenlei