Date: Thu, 11 Dec 2003 16:36:49 -0700 From: Scott Long <scottl@freebsd.org> To: Fabien THOMAS <fabien.thomas@netasq.com> Cc: freebsd-scsi@freebsd.org Subject: Re: asr driver with INVARIANT Message-ID: <3FD8FF91.9010702@freebsd.org> In-Reply-To: <3FD8868C.4020208@netasq.com> References: <3FD8868C.4020208@netasq.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Fabien THOMAS wrote: > When compiled with INVARIANT the driver failed in debugger because the > memory flags is M_WAITOK. > > Is it really necessary to use M_WAITOK here ? > > fabien > > Allocating any memory from within the strategy() path is generally a really bad idea no matter what. However, changing this to M_NOWAIT means that a memory shortage will cause the I/O to fail. What happens if the failed I/O request originated from the vm system trying to push pages to the swap partition in order to create more free memory? The better solution is to pre-allocate all resources needed in this path. Unfortunately, the asr driver is maintainerless. I and many others on this list would be happy to review any patches that you come up with to solve this problem. Scott
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FD8FF91.9010702>