From nobody Tue Sep 23 15:27:32 2025 X-Original-To: dev-commits-src-main@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 4cWP4M6vSmz68mlc for ; Tue, 23 Sep 2025 15:27:47 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWP4M4666z3qY9 for ; Tue, 23 Sep 2025 15:27:47 +0000 (UTC) (envelope-from jonlooney@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-b2e0513433bso305086266b.1 for ; Tue, 23 Sep 2025 08:27:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758641265; x=1759246065; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=E4ljfWZhdWJI+fXf/636eP3pxfoTOoyclT1EchK3qJ8=; b=TW7pW7Qc2z8NxvOMdELzI55tiP1GKMUuPC4N8eehy7M40lmYov0EYYA6yG5glXlWsB FkhHDUIuQV8kbvhMS4qytakaSg4G/4O/vRzks4jWzmFo5ZN+x9XFLQloASLastHFyxVb aTehuH8mphcYcU5DsjMJPYfappcIaPhMjVzrXuAJuKX88gBIVKY0k9mo273ydezkWsb/ 7YBn3EBCm2LjpY+rYM0HySAob5cifS337XAQ+flAgdE20o62soMArsu4y7E6lodfSEMI Es9L/+1I0+MqNHX/hB44/Z6U42ndnwmC0FWUYNA0yy4S2ibNH/DNiLp/0s+GaMP+obEr 0tLw== X-Forwarded-Encrypted: i=1; AJvYcCVZD/GLqKBPbNVazmZGbk59Wuz2XUwQRimxsjov/MpC6Yrkojtz0EgdYz4lRuybAHlC9JpMedI5jnHXseRTVEz5R91Kzw==@freebsd.org X-Gm-Message-State: AOJu0YyW4IHvYtdlQdSrqDfyr5t+afZ57fci1hhF8KyAIxjLoHnNiX/c 5xt+vIxwXJTVWNNL522EwRAjqfvKTH0M85g0PdyedZSFa6ZfqTbfam2u+XDFnKoF X-Gm-Gg: ASbGncvt3cMBZx4p37n+v1ZT5VUWDcz5LmHBOlS4LmFR/8u2zAyMlcsaOEfBneEE138 vFp4GEuTRjPsHcwIQ0iEZoUY8l3dsANVx1bO32K+6m0TsA7ngDVv2HS9zFP5lQVYvTpyWT3Gkwl Q0QBR0AL2vmj2DuXXZNNim7mDxGuapcgo70tfCsZijI+SMI4FWcG/MRcYbaZiZbWpL3O1REc3Ok WwhYGlEURt6JeezFXz8K82ORDdXWjBCuLA04ehDtpfSe76SLztcb8xaK+9OR2JO97/9aLI7J2FD IqbbUkxBPAH+H3Ms9JFoQh5KJzdPysBIOC6o2KEdDpMIx0cS0zeJMs5p1KZyem2l0YHdPwOMVnk YdsEiWs7aXgwMokUSSbNpiBzxaYgiFMJfx7PbWMBkBkUUlUeDCie06g== X-Google-Smtp-Source: AGHT+IH/N6Qx7IhHcBAitel/aGIEmetw6nxKxf8+4eUdjL5hmN1gsU/iziydCyyPlu05LwsnGBNXZg== X-Received: by 2002:a17:906:7943:b0:b04:83af:b4ba with SMTP id a640c23a62f3a-b302c7e6feemr274545966b.52.1758641264705; Tue, 23 Sep 2025 08:27:44 -0700 (PDT) Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com. [209.85.218.51]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b26847b9f37sm996835566b.18.2025.09.23.08.27.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Sep 2025 08:27:44 -0700 (PDT) Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-b2e0513433bso305079566b.1 for ; Tue, 23 Sep 2025 08:27:44 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVq1zqAUlJXDWg4BDAKJH/IEI0y80p833zRulwpaWICnoV6NPJUrRKdQTW0zg+YFFHN0/brz4T+IXmHf2YTI6Fp19vC/g==@freebsd.org X-Received: by 2002:a17:907:3cc7:b0:aff:17b1:dde1 with SMTP id a640c23a62f3a-b3027262102mr288840166b.1.1758641264184; Tue, 23 Sep 2025 08:27:44 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> In-Reply-To: From: "Jonathan T. Looney" Date: Tue, 23 Sep 2025 11:27:32 -0400 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWDvW7cZeCXsRrkn8CuteOlOgc7Ln37gvmewzGa2AgsrtDDxT0aQ6vdaSu4 Message-ID: Subject: Re: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support To: Guido Falsi Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000d6d571063f7993cb" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cWP4M4666z3qY9 --000000000000d6d571063f7993cb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. Jonathan --000000000000d6d571063f7993cb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Sep 22, 2025 at 11:44=E2=80=AFAM = Guido Falsi <madpilot@freebsd.or= g> 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=C2=A0(by comparison) things, like statistics, wher= e we want to avoid contention in a often-used critical path. For low-freque= ncy events, the expense of keeping the counters (memory usage multiplied by= the number of cores; more difficult debugging; etc.) may outweigh the bene= fits.

Jonathan
--000000000000d6d571063f7993cb--