From: Gong Ruiqi <gongruiqi1@huawei.com>
To: Ondrej Mosnacek <omosnace@redhat.com>
Cc: Paul Moore <paul@paul-moore.com>,
Stephen Smalley <stephen.smalley.work@gmail.com>,
<selinux@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Wang Weiyang <wangweiyang2@huawei.com>
Subject: Re: [PATCH testsuite] tests/task_setscheduler: add cgroup v2 case for moving proc to root cgroup
Date: Sat, 27 Jul 2024 10:54:30 +0800 [thread overview]
Message-ID: <55390a1e-5994-465a-a5c5-94f3370259c3@huawei.com> (raw)
In-Reply-To: <CAFqZXNsN9M__Mo018L8m0txi60vm3Ui5HgHvJYQK__0hhhMULQ@mail.gmail.com>
On 2024/07/26 21:43, Ondrej Mosnacek wrote:
> On Thu, Jul 18, 2024 at 2:34 PM Gong Ruiqi <gongruiqi1@huawei.com> wrote:
>>
>>
>> On 2024/07/18 0:17, Paul Moore wrote:
>>> ...
>>>
>>> Where (what distribution, version, etc.) did you see this problem?
>>
>> The problem occurred when I ran the testsuite on Fedora 40 with v6.6
>> kernel, and it was the only failed testcase.
>
> Sorry for the delay... For some reason the test passes for me even
> with cgroup v2 only and without the patch (also when run from a
> regular user account with sudo). Do you happen to know what
> circumstances are needed for it to fail when the cgroup is not
> switched?
>
As the comment in the script says, a process need to be in the root
cgroup in order to switch its scheduler policy to SCHED_{RR,FIFO}. So
maybe in your case the shell process is already in the root cgroup?
In my case I need to ssh to a Fedora VM, and that makes my shell process
to be in a sub cgroup called /user.slice/.../XXX.scope (looks like some
systemd stuff). And since /sys/fs/cgroup/cpu/tasks doesn't exit in the
system with cgroup v2 only, the script skips moving the target process
to the root cgroup, and therefore the subsequent test fails.
next prev parent reply other threads:[~2024-07-27 2:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240702095401.16278-1-gongruiqi1@huawei.com>
2024-07-17 2:18 ` Gong Ruiqi
2024-07-17 16:17 ` Paul Moore
2024-07-18 12:34 ` Gong Ruiqi
2024-07-26 13:43 ` Ondrej Mosnacek
2024-07-27 2:54 ` Gong Ruiqi [this message]
2024-07-29 10:28 ` Ondrej Mosnacek
2024-07-29 11:55 ` Stephen Smalley
2024-07-30 8:15 ` Ondrej Mosnacek
2024-07-30 11:30 ` Stephen Smalley
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=55390a1e-5994-465a-a5c5-94f3370259c3@huawei.com \
--to=gongruiqi1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=selinux@vger.kernel.org \
--cc=stephen.smalley.work@gmail.com \
--cc=wangweiyang2@huawei.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
all inboxes | Powered by JetHome®