public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: David CARLIER <devnexen@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Josh Law <objecting@objecting.org>,
	Dennis Zhou <dennis@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib: fix compare_delta parameter order in percpu_counter_tree
Date: Mon, 16 Mar 2026 09:53:05 -0400	[thread overview]
Message-ID: <5134efe0-e780-467b-9289-fe5e4f7aebca@efficios.com> (raw)
In-Reply-To: <CA+XhMqx8R+cNCH2WT3ffiJ=unEqTgR0pgQgxuLNHQmn-yndG-w@mail.gmail.com>

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

  reply	other threads:[~2026-03-16 13:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 17:54 [PATCH] lib: fix compare_delta parameter order in percpu_counter_tree David Carlier
2026-03-14 15:30 ` Josh Law
2026-03-14 21:45 ` Andrew Morton
2026-03-15 22:00   ` Mathieu Desnoyers
2026-03-15 22:47     ` David CARLIER
2026-03-15 23:16       ` Mathieu Desnoyers
2026-03-16  0:05         ` David CARLIER
2026-03-16  0:41           ` Mathieu Desnoyers
2026-03-16  4:28             ` David CARLIER
2026-03-16 13:06               ` Mathieu Desnoyers
2026-03-16 13:41                 ` David CARLIER
2026-03-16 13:53                   ` Mathieu Desnoyers [this message]
2026-03-16 14:15                     ` David CARLIER
2026-03-16 14:15                     ` David CARLIER
2026-03-16 14:23                       ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5134efe0-e780-467b-9289-fe5e4f7aebca@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=akpm@linux-foundation.org \
    --cc=dennis@kernel.org \
    --cc=devnexen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=objecting@objecting.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox