Re: REGRESSION: boot stalls on several old dual core Intel CPUs

From: Peter Zijlstra
Date: Mon Sep 03 2018 - 04:54:50 EST


On Mon, Sep 03, 2018 at 09:38:15AM +0200, Thomas Gleixner wrote:
> On Mon, 3 Sep 2018, Peter Zijlstra wrote:
> > On Sat, Sep 01, 2018 at 11:51:26AM +0930, Kevin Shanahan wrote:
> > > commit 01548f4d3e8e94caf323a4f664eb347fd34a34ab
> > > Author: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
> > > Date: Tue Aug 18 17:09:42 2009 +0200
> > >
> > > clocksource: Avoid clocksource watchdog circular locking dependency
> > >
> > > stop_machine from a multithreaded workqueue is not allowed because
> > > of a circular locking dependency between cpu_down and the workqueue
> > > execution. Use a kernel thread to do the clocksource downgrade.
> >
> > I cannot find stop_machine usage there; either it went away or I need to
> > like wake up.
>
> timekeeping_notify() which is involved in switching clock source uses stomp
> machine.

ARGH... OK, lemme see if I can come up with something other than
endlessly spawning that kthread.

A special purpose kthread_worker would make more sense than that.