From: no-reply@sashiko.virtuozzo.com
To: Vladimir Riabchun <vladimir.riabchun@virtuozzo.com>,
Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v4 1/2] sched: Fix sched_getaffinity syscall
Date: Wed, 18 Nov 2026 19:47:54 +0000 [thread overview]
Message-ID: <010701a1f033954e-bab04957-8e1c-4664-9a4c-78b9582a3b2c-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261118-ct-invalid-nrpoc-v4-1-30baaeda3f87@virtuozzo.com>
> We observed incorrect cpu numbers inside containers:
> [root@localhost ~]# nproc
> 64
>
> even when there were much less physical/virtual CPUs.
>
> The root cause is incorrect bitmap_fill usage - it sets whole
> longs only, without handling bit tails, so the actual number of
> set bits is 64 = bits in ULONG.
> If we use cpumask only or vcpus only, nproc and other getaffinity
> users will get incorrect info about CT resources.
>
> We can't run on more than count(cpuset) CPUs and we are
> limited by vCPU number. So the minimum of these two is the
> real limit.
> [ ... ]
>
> https://virtuozzo.atlassian.net/browse/VSTOR-141682
> Fixes: 17e30fe0e094 ("sched: Return only virtual cpus in sched_getaffinity()")
> Feature: sched: virtualize CT cpu affinity management
> Signed-off-by: Vladimir Riabchun <vladimir.riabchun@virtuozzo.com>
Sashiko has reviewed this patch and found no issues.
Carry the trailer below into the next revision and Sashiko will not review this patch again.
Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261118-ct-invalid-nrpoc-v4-0-30baaeda3f87@virtuozzo.com?part=1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-18 19:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 19:42 [Devel] [PATCH hci-8.1 v4 0/2] sched: Fix incorrect nproc report inside CT Vladimir Riabchun
2026-11-18 19:43 ` [Devel] [PATCH hci-8.1 v4 1/2] sched: Fix sched_getaffinity syscall Vladimir Riabchun
2026-11-18 19:47 ` no-reply [this message]
2026-11-18 19:43 ` [Devel] [PATCH hci-8.1 v4 2/2] selftests: ve: Test sched_getaffinity in VE Vladimir Riabchun
2026-11-18 19:50 ` no-reply
2026-11-19 9:51 ` Vladimir Riabchun
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=010701a1f033954e-bab04957-8e1c-4664-9a4c-78b9582a3b2c-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.com \
--cc=vladimir.riabchun@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox