tech-kern archive

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

Re: config_mounroot - spinout while attaching nouveaufb0 on amd64 with LOCKDEBUG



> Date: Mon, 17 Feb 2020 00:29:03 +0100
> From: Jaromír Doleček <jaromir.dolecek%gmail.com@localhost>
> 
> while debugging the MSI attachment for nouveaufb0, I've got several
> times spinout panic like one below. It doesn't happen on every boot,
> but on almost every one.
> 
> I confirmed via ddb that this happens due to config_mountroot_thread()
> holding the kernel lock for too long - that's where backtrack for cpu
> 0 (which holds the lock) leads.
> 
> Would it be worth it to spend some efford to run that thread without
> kernel lock, or postpone the driver initialization even further?

Maybe we could have an MP-safe variant of config_mountroot which
nouveau could use.  Just a matter of teaching config_mountroot_thread
to KERNEL_LOCK/UNLOCK around the callback according to a flag stored
somewhere, much like we do elsewhere.

Deferring it some other way would be suboptimal because we really want
this as soon as possible once the file system is available to load
firmware from.  (It would be even better if we could get the firmware
earlier from the botloader somehow, like the bootloader can load
modules, but it's not entirely clear how to structure the logic to
decide _which_ firmware to load early on.)


Home | Main Index | Thread Index | Old Index