Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] selftests/ve: CPU count taken from sysconf() not the possible
  mask
--

commit e3f3b30a760161024a96299f38de8b9682310200
Author: Pavel Tikhomirov <[email protected]>

fs/aio: restore the AIO ring of the dumped size in a pseudosuper VE

In a pseudosuper VE, ioctx_alloc() skips the num_possible_cpus() * 4 minimum 
ring size. This lets CRIU restore a ring of the size it had when dumped. A ring 
below the node minimum does not use the per-CPU caches of free slots.

> diff --git a/fs/aio.c b/fs/aio.c
> index 901cb622fe2c..2ff175850761 100644
> --- a/fs/aio.c
> +++ b/fs/aio.c
[ ... ]
> -     nr_events = max(nr_events, num_possible_cpus() * 4);
> +     if (ve_is_super(ve) || !ve->is_pseudosuper)
> +             nr_events = max(nr_events, num_possible_cpus() * 4);
> +     else if (nr_events < num_possible_cpus() * 4)
> +             no_percpu_reqs = true;

[Severity: Low]
This isn't a bug in this hunk, but the selftest added later in the series 
(tools/testing/selftests/ve/ve_aio_ring_test.c) takes its CPU count from 
sysconf(_SC_NPROCESSORS_CONF) in FIXTURE_SETUP(ve_aio_ring). The kernel sizes 
the ring with num_possible_cpus() here. The sysconf() value comes from the cpuN 
entries in sysfs, which need not cover the possible mask.

Can the test compute wrong expected ring sizes, and so make a wrong SKIP 
decision, on a host where the possible CPU mask is larger than the set of 
present CPUs? As reported by Konstantin Khorenko on v1 [1], reading 
/sys/devices/system/cpu/possible would match what the kernel uses. The v2 code 
does not do this.

[1] 
https://lore.kernel.org/r/179459890134.57567.3765669749365305224.b4-review@b4

-- 
Sashiko AI review ยท 
https://sashiko.vzint.dev/#/patchset/20261116-pr-ptikhomirov-vstor-154129-aio-pseudosuper-ring-v2-0-532d149b4...@virtuozzo.com?part=1

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to