lkml.org 
[lkml]   [2022]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched/schedutil: Fix deadlock between cpuset and cpu hotplug when using schedutil
On Mon, 11 Jul 2022 10:58:28 -1000
Tejun Heo <tj@kernel.org> wrote:

> I don't think lockdep would be able to track CPU1 -> CPU2 dependency here
> unfortunately.
>
> > AFAIU:
> >
> >
> > CPU0 CPU1 CPU2
> >
> > // attach task to a different
> > // cpuset cgroup via sysfs
> > __acquire(cgroup_threadgroup_rwsem)
> >
> > // pring up CPU2 online
> > __acquire(cpu_hotplug_lock)
> > // wait for CPU2 to come online

Should there be some annotation here that tells lockdep that CPU1 is now
blocked on CPU2?

Then this case would be caught by lockdep.

-- Steve


> > // bringup cpu online
> > // call cpufreq_online() which tries to create sugov kthread
> > __acquire(cpu_hotplug_lock) copy_process()
> > cgroup_can_fork()
> > cgroup_css_set_fork()
> > __acquire(cgroup_threadgroup_rwsem)
> > // blocks forever // blocks forever // blocks forever
> >

\
 
 \ /
  Last update: 2022-07-11 23:12    [W:1.684 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site