On Thu, Sep 29, 2011 at 10:51:25PM +0200, Jean-Yves Migeon wrote: > >Blocking kmem is not necessarily a bug is you hold an adaptive lock. > >Your mutex is IPL_NONE, if I remember correctly. You probably don't need > >to be smart. > > I am not sure that this lock will be released if the LWP needs to sleep > for the allocation. Which means that the lock will block other LWPs from > running even when they do not need to allocate memory.
Of course I can preallocate the structure and avoid the issue this way. But similar issues seem to be widely present in the detach/deregister-type routines (another example: drvctl_close() in kern_drvctl.c). - Jukka.