Subject: Re: M_NOWAIT during attach
To: None <firstname.lastname@example.org>
From: Bill Stouder-Studenmund <email@example.com>
Date: 11/05/2007 13:54:36
Content-Type: text/plain; charset=us-ascii
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
> 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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)
-----END PGP SIGNATURE-----