Re: [PATCH] lib: fix compare_delta parameter order in percpu_counter_tree
From: David CARLIER
Date: Mon Mar 16 2026 - 10:21:01 EST
On Mon, 16 Mar 2026 at 13:53, Mathieu Desnoyers
<mathieu.desnoyers@xxxxxxxxxxxx> wrote:
>
> On 2026-03-16 09:41, David CARLIER wrote:
> > Sure. For precise_compare_value, the boundary tests extend
> > naturally — the function must return the exact result regardless
> > of which code path (fast approximate or precise fallback) is taken.
> >
> > For the two-counter APIs, I noticed that the combined accuracy
> > is always symmetric: over_a + under_b = under_a + over_b =
> > (bs_a + bs_b - 1) * multiplier, so the asymmetric gap test
> > doesn't apply there. But boundary tests at the combined accuracy
> > limit still provide useful coverage.
>
> In order to do a relevant test for the two-counter APIs, we'll need
> to initialize each of the two counters with different batch sizes.
> This will ensure that the limits are asymmetric, and therefore allow
> more precise testing of the limit conditions.
>
> Thanks,
>
> Mathieu
>
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> https://www.efficios.com