OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Vladimir Riabchun <vladimir.riabchun@virtuozzo.com>
To: Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v3 1/2] sched: Fix sched_getaffinity syscall
Date: Wed, 18 Nov 2026 20:41:48 +0100	[thread overview]
Message-ID: <0d3ac66b-d09c-4885-bb08-356f3d51d2e1@virtuozzo.com> (raw)
In-Reply-To: <179450866043.4060562.8074544626987959409.b4-review@b4>



On 11/12/26 19:37, Konstantin Khorenko wrote:
> I won't apply this version, please send v4 with the changes below.
> 
> On Thu, 29 Oct 2026 11:16:06 +0100, Vladimir Riabchun <vladimir.riabchun@virtuozzo.com> wrote:
>> The root cause is incorrect bitmap_fill usage - it sets whole
>> integers only, without handling bit tails, so the actual number of
>> set bits is 64 = bits in ULONG.
> 
> Items 1 and 2 of the cover letter reply: add the Fixes: and Feature:
> trailers, write "whole unsigned longs", and say what a CT sees now.
> 
> Why: 87211cbff4b4 added the CT branch with bitmap_fill(). Since v3
> the vCPU limit comes from the target task and the count follows the
> cpuset, so nproc may differ from /proc/cpuinfo. A reader of the
> message should not have to find that in the cover changelog.

Will fix in v4.

> 
>> +		/*
>> +		 * setaffinity is not available inside CT, so these bits
>> +		 * can only be used for counting.
> 
> Item 3: sched_setaffinity() returns 0 in a CT and does nothing, it is
> not "not available".

This is actually very misleading. Maybe we want to explicitly return
-EPERM from sched_setaffinity in !ve_is_super(get_exec_env()) case?
Or the userspace will break? I tried with -EPERM and CTs start
just fine.

> 

-- 
Best regards, Riabchun Vladimir
Linux Kernel Developer, Virtuozzo

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

  reply	other threads:[~2026-11-18 19:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 10:16 [Devel] [PATCH hci-8.1 v3 0/2] sched: Fix incorrect nproc report inside CT Vladimir Riabchun
2026-10-29 10:16 ` [Devel] [PATCH hci-8.1 v3 1/2] sched: Fix sched_getaffinity syscall Vladimir Riabchun
2026-10-29 10:21   ` no-reply
2026-10-29 10:48     ` Vladimir Riabchun
2026-11-12 18:37   ` Konstantin Khorenko
2026-11-18 19:41     ` Vladimir Riabchun [this message]
2026-10-29 10:16 ` [Devel] [PATCH hci-8.1 v3 2/2] selftests: ve: Test sched_getaffinity in VE Vladimir Riabchun
2026-10-29 10:22   ` no-reply
2026-10-29 10:50     ` Vladimir Riabchun
2026-11-12 18:37   ` Konstantin Khorenko
2026-11-18 19:42     ` Vladimir Riabchun
2026-11-12 18:37 ` [Devel] [PATCH hci-8.1 v3 0/2] sched: Fix incorrect nproc report inside CT 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=0d3ac66b-d09c-4885-bb08-356f3d51d2e1@virtuozzo.com \
    --to=vladimir.riabchun@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@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