Re: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support
- Reply: Guido Falsi : "Re: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support"
- In reply to: Guido Falsi : "Re: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 Sep 2025 15:27:32 UTC
On Mon, Sep 22, 2025 at 11:44 AM Guido Falsi <madpilot@freebsd.org> 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