Re: [sched_ext/for-6.11]: Issue with BPF Scheduler during CPU Hotplug

From: Tejun Heo
Date: Tue Sep 17 2024 - 08:48:34 EST


Hello, Aboorva.

On Mon, Aug 26, 2024 at 08:32:03AM -1000, Tejun Heo wrote:
> On Fri, Aug 23, 2024 at 02:50:01PM +0530, Aboorva Devarajan wrote:
> ...
> > I applied this patch to the almost latest sched-ext (for-6.12) branch upto
> > commit 89909296a51e792 ("sched_ext: Don't use double locking to migrate
> > tasks across CPUs") and let the test run for over 20 hours, and it completed
> > without any hangs on both x86 and PowerPC.
> >
> > So, indeed, making sure that both scx_fork_rwsem and cpu_hotplug_lock (read)
> > are only held together simulataneously when they can both be acquired seems
> > to be resolving the deadlock.
>
> Thanks a lot for confirming. Let me think it over a bit re. what should be
> applied.

Sorry about the delay. It ended up a bit invasive and took longer. Can you
please verify the following branch fixes the problem?

https://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git scx-enable-locking-fix

Thanks.

--
tejun