Subject: Re: Messages from new aic7xxx driver
To: Justin T. Gibbs <gibbs@freefall.freebsd.org>
From: Noriyuki Soda <soda@sra.co.jp>
List: current-users
Date: 05/21/1996 15:52:53
>>>>> On Mon, 20 May 1996 07:35:21 -0700,
	"Justin T. Gibbs" <gibbs@freefall.freebsd.org> said:

>> Because unlike FreeBSD, NetBSD's sdstart() always use SCSI_NOSLEEP.

> The printf that you reported earlier indicated that malloc(M_NOWAIT)
> failed.  This shouldn't be affected by the NOSLEEP flag although the
> failure could have occured during an interrupt context.

Oops, it was my mistake. ahc_get_scb() always uses malloc(M_NOWAIT) as
you said, because if driver uses paging system to malloc with wait,
(and if paging system uses driver to obtain free memory by page out),
it is deadlock.

>>> I don't know why NetBSD has problems allocating SCB space on demand.  Is
>>> malloc(M_NOWAIT) likely to fail if used some time after boot?  There

malloc(M_NOWAIT) fails whenever free physical memory is not enough. 
FreeBSD should be similar to NetBSD in this point. But this situation
is very rare in both systems, since paging system is always making
effort to reserve some free physical memory.
--
soda@sra.co.jp		Software Research Associates, Inc., Japan
(Noriyuki Soda)		   software tools and technology group