co...@sdf.org writes: > Hi! > > Poking around I noticed KERNEL_LOCK is occasionally > grabbed by cdev_* for noticeable periods of time. > > Looking at the code, it grabs DEV_LOCK which is effectively > KERNEL_LOCK if the driver is not declared MPSAFE. > > It appears that many "big name" drivers (wd, nvme) do > not have d_flags D_MPSAFE, unless I am reading things > wrong.
yes. when something with the kernel lock taken sleeps, the lock is dropped. rarely do these drivers run for a long time without sleeping. so while definitely something we are planning to fix it, shouldn't be a place that the kernel lock is helf for a long time. .mrg.