tech-kern archive

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

Re: kernel_lock, splbio() and SMP_SAFE


Manuel Bouyer <> wrote:
> given a low-level subsystem (say, a driver) which is not SMP-safe
> and is using the old spl() locking scheme, how is this subsystem
> protected from SMP-save upper-level subsystems calling one of its
> entry point ? I would expect kernel_lock() to be taken at some
> point, but I can't find where it's happening in this case.
> ...
> cpu_dumpconf(0,0,14,0,0,c03098a0,0,0,c07090b8,0) at netbsd:cpu_dumpconf
> +0x37 main(0,c01002a7,0,0,0,0,0,0,0,0) at netbsd:main+0x28b
> ...
> I can't believe we have such a big synchronisation issue in our kernel
> that would have been unnoticed for so long. Can someone explain me how this
> is supposed to work ? 

Why big? It seems to be a very specific and rare case i.e. cpu_dumpconf() is
called very early and calls RAIDframe in unusual way.

Kernel-lock is handled in upper-level subsystems (regarding I/O, please see
biodone2() in vfs_bio.c, intr_biglock_wrapper() for interrupt handlers, etc).

Objective, of course, to fully remove it (which could mean pushing deeper
to lower layers). Talking about ATA system, I hope you can help on this. :)


Home | Main Index | Thread Index | Old Index