Re: [PATCH] sched/rt: Rework for_each_process_thread() iterations in tg_has_rt_tasks()

From: Kirill Tkhai
Date: Thu Apr 26 2018 - 05:26:56 EST


On 25.04.2018 20:55, Peter Zijlstra wrote:
> On Thu, Apr 19, 2018 at 08:29:01PM +0300, Kirill Tkhai wrote:
>> tg_rt_schedulable() iterates over all child task groups,
>> while tg_has_rt_tasks() iterates over all linked tasks.
>> In case of systems with big number of tasks, this may
>> take a lot of time.
>
> So you're actually using RT cgroups?

I myself don't use them, but this goes from CRIU project. We try to dump and to restore
every configuration that people may use. Sometimes they configure RT parameters of cpu
cgroup, and criu has to restore them as they was at the moment of dump. So, this is the place,
where we met the hard lockup. I can't say, what forces people to use nested cpu cgroup
for RT...

> Some of us recently considered removing that thing entirely because most
> distro's don't actually use it at all -- and it's broken from a RT POV.
>
> That would then clear the slate to try and implement something new.
>
> But if you're actually using this stuff, that would complicate matters.

>From the point of criu project, if you delete them, this will decrease
the number of essence we need to support, so I'm not against that :D

Seriously speaking, it's a surprise for me, that they are broken. It seemed,
everything is nice from RT POV: throttling, boosting, PI...

Kirill