Subject: Re: M_NOWAIT during attach
To: None <>
From: Bill Stouder-Studenmund <>
List: tech-kern
Date: 11/05/2007 13:54:36
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, Nov 05, 2007 at 09:22:57PM +0100, Joerg Sonnenberger wrote:
> Hi all,
> why are many drivers currently using M_NOWAIT during attach?
> I understand that sleeping on allocations would fail during boot, but
> device attachment can happen later, especially if we ever want to get
> LKMs working. If anything, this should be detected by malloc/free
> internally. The default behaviour for drivers in such cases is panic as
> well.

Sounds good.

> Can we change this to just use M_WAITOK if the allocation doesn't happen
> from interrupt context?

Sure. Though for attach, I think we shouldn't be attaching stuff in an
interrupt context. I think that if we detect new hardware, we should
trigger a thread to come along and config everything.

Take care,


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.7 (NetBSD)