Re: [PATCH] sched_deadline, docs: add affinity setting with cgroup2 cpuset controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Juri,

On Tue, May 27, 2025 at 03:11:45PM +0200, Juri Lelli wrote:
> Hello!
> 
> On 22/05/25 17:06, Shashank Balaji wrote:
> > Setting the cpu affinity mask of a SCHED_DEADLINE process using the cgroup v1
> > cpuset controller is already detailed. Add similar information for cgroup v2's
> > cpuset controller.
> 
> Thanks a lot for working on this. Really appreaciated.

Thank you :)

> > +5.2 Using cgroup v2 cpuset controller
> > +-------------------------------------
> > +
> > + Assuming the cgroup v2 root is mounted at ``/sys/fs/cgroup``.
> > +
> > +   cd /sys/fs/cgroup
> > +   echo '+cpuset' > cgroup.subtree_control
> > +   mkdir deadline_group
> > +   echo 0 > deadline_group/cpuset.cpus
> > +   echo 'root' > deadline_group/cpuset.cpus.partition
> > +   echo $$ > deadline_group/cgroup.procs
> > +   rt-app -t 100000:10000:d:0 -D5
> 
> Sadly, the example with cgroup v1 was made at a time when rt-app still
> supported command line parameters like the above. I believe nowadays
> that is not the case anymore and one needs to create a json file
> describing the task to run it with rt-app.
> 
> I would say we should update both examples to use something a little
> more generic, e.g.,
> 
> # chrt --deadline --sched-runtime 10000000 --sched-period 100000000 0 yes >/dev/null &
> 
> What do you think?
> 
> Best,
> Juri

Haha, I was just about to send the patch with the chrt example, when I
checked out the rt-app repo and saw that it's much more powerful. I
thought, "they must have had a good reason for using rt-app instead of
chrt for the example", and switched it to rt-app at the last second. I
didn't know that rt-app doesn't support command line parameters anymore.
I'll send out v2 with the chrt example.

Thanks!

Regards,
Shashank




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux