asr driver with INVARIANT
Scott Long
scottl at freebsd.org
Thu Dec 11 15:38:06 PST 2003
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
More information about the freebsd-scsi
mailing list