From: Juri Lelli <juri.lelli@redhat.com>
To: Marcel Ziswiler <marcel.ziswiler@codethink.co.uk>
Cc: luca abeni <luca.abeni@santannapisa.it>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Vineeth Pillai <vineeth@bitbyteword.org>
Subject: Re: SCHED_DEADLINE tasks missing their deadline with SCHED_FLAG_RECLAIM jobs in the mix (using GRUB)
Date: Thu, 29 May 2025 11:39:05 +0200 [thread overview]
Message-ID: <aDgrOWgYKb1_xMT6@jlelli-thinkpadt14gen4.remote.csb> (raw)
In-Reply-To: <c91a117401225290fbf0390f2ce78c3e0fb3b2d5.camel@codethink.co.uk>
[-- Attachment #1: Type: text/plain, Size: 2080 bytes --]
Hi Marcel,
On 25/05/25 21:29, Marcel Ziswiler wrote:
> Hi Luca
>
> On Fri, 2025-05-23 at 21:46 +0200, luca abeni wrote:
> > Hi Marcel,
> >
> > sorry, but I have some additional questions to fully understand your
> > setup...
>
> No Problem, I am happy to answer any questions :)
>
> > On Mon, 19 May 2025 15:32:27 +0200
> > Marcel Ziswiler <marcel.ziswiler@codethink.co.uk> wrote:
> > [...]
> > > > just a quick question to better understand your setup (and check
> > > > where the issue comes from):
> > > > in the email below, you say that tasks are statically assigned to
> > > > cores; how did you do this? Did you use isolated cpusets,
> > >
> > > Yes, we use the cpuset controller from the cgroup-v2 APIs in the
> > > linux kernel in order to partition CPUs and memory nodes. In detail,
> > > we use the AllowedCPUs and AllowedMemoryNodes in systemd's slice
> > > configurations.
> >
> > How do you configure systemd? I am having troubles in reproducing your
> > AllowedCPUs configuration... This is an example of what I am trying:
> > sudo systemctl set-property --runtime custom-workload.slice AllowedCPUs=1
> > sudo systemctl set-property --runtime init.scope AllowedCPUs=0,2,3
> > sudo systemctl set-property --runtime system.slice AllowedCPUs=0,2,3
> > sudo systemctl set-property --runtime user.slice AllowedCPUs=0,2,3
> > and then I try to run a SCHED_DEADLINE application with
> > sudo systemd-run --scope -p Slice=custom-workload.slice <application>
>
> We just use a bunch of systemd configuration files as follows:
>
...
> > How are you configuring the cpusets?
>
> See above.
>
Could you please add 'debug sched_debug sched_verbose' to your kernel
cmdline and share the complete dmesg before starting your tests?
Also, I am attaching a script that should be able to retrieve cpuset
information if you run it with
# python3 get_cpuset_info.py > cpuset.out
Could you please also do that and share the collected information?
It should help us to better understand your setup and possibly reproduce
the problem you are seeing.
Thanks!
Juri
[-- Attachment #2: get_cpuset_info.py --]
[-- Type: text/plain, Size: 1766 bytes --]
import os
def get_cpuset_info(cgroup_path):
"""Retrieves cpuset information for a given cgroup path."""
info = {}
files_to_check = [
'cpuset.cpus',
'cpuset.mems',
'cpuset.cpus.effective',
'cpuset.mems.effective',
'cpuset.cpus.exclusive',
'cpuset.cpus.exclusive.effective',
'cpuset.cpus.partition'
]
for filename in files_to_check:
filepath = os.path.join(cgroup_path, filename)
if os.path.exists(filepath) and os.access(filepath, os.R_OK):
try:
with open(filepath, 'r') as f:
info[filename] = f.read().strip()
except Exception as e:
info[filename] = f"Error reading: {e}"
# else:
# info[filename] = "Not found or not readable" # Uncomment if you want to explicitly show missing files
return info
def main():
cgroup_root = '/sys/fs/cgroup'
print(f"Recursively retrieving cpuset information from {cgroup_root} (cgroup v2):\n")
for dirpath, dirnames, filenames in os.walk(cgroup_root):
# Skip the root cgroup directory itself if it's not a delegate
# and only process subdirectories that might have cpuset info.
# This is a heuristic; if you want to see info for the root too, remove this if.
# if dirpath == cgroup_root:
# continue
cpuset_info = get_cpuset_info(dirpath)
if cpuset_info: # Only print if we found some cpuset information
print(f"Cgroup: {dirpath.replace(cgroup_root, '') or '/'}")
for key, value in cpuset_info.items():
print(f" {key}: {value}")
print("-" * 30) # Separator for readability
if __name__ == "__main__":
main()
next prev parent reply other threads:[~2025-05-29 9:39 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 18:04 Marcel Ziswiler
2025-05-02 13:55 ` Juri Lelli
2025-05-02 14:10 ` luca abeni
2025-05-03 13:14 ` Marcel Ziswiler
2025-05-05 15:53 ` luca abeni
2025-05-03 11:14 ` Marcel Ziswiler
2025-05-07 20:25 ` luca abeni
2025-05-19 13:32 ` Marcel Ziswiler
2025-05-20 16:09 ` luca abeni
2025-05-21 9:59 ` Marcel Ziswiler
2025-05-23 19:46 ` luca abeni
2025-05-25 19:29 ` Marcel Ziswiler
2025-05-29 9:39 ` Juri Lelli [this message]
2025-06-02 14:59 ` Marcel Ziswiler
2025-06-17 12:21 ` Juri Lelli
2025-06-18 11:24 ` Marcel Ziswiler
2025-06-20 9:29 ` Juri Lelli
2025-06-20 9:37 ` luca abeni
2025-06-20 9:58 ` Juri Lelli
2025-06-20 14:16 ` luca abeni
2025-06-20 15:28 ` Juri Lelli
2025-06-20 16:52 ` luca abeni
2025-06-24 7:49 ` Juri Lelli
2025-06-24 12:59 ` Juri Lelli
2025-06-24 15:00 ` luca abeni
2025-06-25 9:30 ` Juri Lelli
2025-06-25 10:11 ` Juri Lelli
2025-06-25 12:50 ` luca abeni
2025-06-26 10:59 ` Marcel Ziswiler
2025-06-26 11:45 ` Juri Lelli
2025-06-25 15:55 ` Marcel Ziswiler
2025-06-24 13:36 ` luca abeni
2025-05-30 9:21 ` luca abeni
2025-06-03 11:18 ` Marcel Ziswiler
2025-06-06 13:16 ` luca abeni
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=aDgrOWgYKb1_xMT6@jlelli-thinkpadt14gen4.remote.csb \
--to=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.abeni@santannapisa.it \
--cc=marcel.ziswiler@codethink.co.uk \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=vineeth@bitbyteword.org \
/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®