All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>,
	Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v2 1/2] fs/aio: restore the AIO ring of the dumped size in a pseudosuper VE
Date: Mon, 16 Nov 2026 10:36:41 +0000	[thread overview]
Message-ID: <010701a1e3ee352d-7cafd265-ba07-4cd9-ae83-53c99d6e8c68-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261116-pr-ptikhomirov-vstor-154129-aio-pseudosuper-ring-v2-1-532d149b4bd7@virtuozzo.com>

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 <ptikhomirov@virtuozzo.com>

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-532d149b4bd7@virtuozzo.com?part=1

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-11-16 10:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 10:31 [Devel] [PATCH hci-8.1 v2 0/2] fs/aio: fix CT migration with AIO to a node with more CPUs Pavel Tikhomirov
2026-11-16 10:31 ` [Devel] [PATCH hci-8.1 v2 1/2] fs/aio: restore the AIO ring of the dumped size in a pseudosuper VE Pavel Tikhomirov
2026-11-16 10:36   ` no-reply [this message]
2026-11-16 10:31 ` [Devel] [PATCH hci-8.1 v2 2/2] selftests/ve: check the AIO ring " Pavel Tikhomirov
2026-11-16 10:38   ` no-reply
2026-11-16 16:55 ` [Devel] [PATCH hci-8.1 v2 0/2] fs/aio: fix CT migration with AIO to a node with more CPUs Konstantin Khorenko
2026-11-16 16:55 ` Konstantin Khorenko

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=010701a1e3ee352d-7cafd265-ba07-4cd9-ae83-53c99d6e8c68-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    --cc=ptikhomirov@virtuozzo.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.