From: sashiko-bot@kernel.org
To: "Eva Kurchatova" <eva.kurchatova@virtuozzo.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH 2/2] selftests: bpf: size the map in test_lru_sanity3 to whole refills
Date: Thu, 17 Sep 2026 02:01:31 +0000 [thread overview]
Message-ID: <20260917020132.68D951F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260917015605.2464043-2-eva.kurchatova@virtuozzo.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] bpf: multi-line comment opening '/*' is not on its own line
--
commit 8ef3f0915a719ad39da5bb2d44612274f4d4d332
Author: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
selftests: bpf: size the map in test_lru_sanity3 to whole refills
This commit fixes a test failure in test_lru_sanity3 that occurs on certain
CPU configurations, like six CPUs. It adjusts the map size so that target_free
divides evenly, preventing partial refills that prematurely evict elements.
> diff --git a/tools/testing/selftests/bpf/test_lru_map.c b/tools/testing/selftests/bpf/test_lru_map.c
> index 0921939532c6c..fc67a337d3c1b 100644
> --- a/tools/testing/selftests/bpf/test_lru_map.c
> +++ b/tools/testing/selftests/bpf/test_lru_map.c
> @@ -441,8 +441,18 @@ static void test_lru_sanity3(int map_type, int map_flags, unsigned int tgt_free)
> assert(sched_next_online(0, &next_cpu) != -1);
>
> batch_size = __tgt_size(tgt_free);
> + if (!batch_size)
> + batch_size = 1;
> +
> + /* The local free list is refilled lru->target_free elements at a
[Severity: Low]
Does this newly added comment block in test_lru_sanity3 follow the BPF
subsystem's multi-line comment style?
The BPF subsystem guidelines prefer the opening '/*' to be placed on its
own line, rather than sharing the first line with the comment text.
> + * time, and a refill the global free list cannot satisfy in full
> + * shrinks the LRU list, which evicts elements that are still live.
> + * Size the map so that target_free divides it, otherwise filling it
> + * ends on a partial refill and evicts the elements referenced below.
> + */
> + map_size = __map_size(batch_size);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260917015605.2464043-1-eva.kurchatova@virtuozzo.com?part=2
next prev parent reply other threads:[~2026-09-17 2:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 1:55 [PATCH 1/2] selftests: bpf: run test_xdp_features in its own netns Eva Kurchatova
2026-09-17 1:55 ` [PATCH 2/2] selftests: bpf: size the map in test_lru_sanity3 to whole refills Eva Kurchatova
2026-09-17 2:01 ` sashiko-bot [this message]
2026-09-17 2:13 ` [PATCH 1/2] selftests: bpf: run test_xdp_features in its own netns Alexei Starovoitov
2026-09-17 2:45 ` bot+bpf-ci
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=20260917020132.68D951F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=eva.kurchatova@virtuozzo.com \
--cc=sashiko-reviews@lists.linux.dev \
/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