Subject: CVS commit: [netbsd-2-0] src/sys/dev/scsipi
To: None <source-changes@NetBSD.org>
From: Havard Eidnes <he@netbsd.org>
List: source-changes
Date: 09/11/2004 12:55:11
Module Name: src
Committed By: he
Date: Sat Sep 11 12:55:11 UTC 2004
Modified Files:
src/sys/dev/scsipi [netbsd-2-0]: sd.c
Log Message:
Pull up revisions 1.221-1.223 (via patch, requested by bouyer in ticket #837):
Improve handling of memory shortage, to fix problems like:
sd3(mpt0:0:1:0): unable to allocate scsipi_xfer
sd3: not queued, error 12
The theory is that other consumers of pool memory is causing
this memory shortage in certain somewhat hard to reproduce
situations.
This is done by giving scsipi_command an extra argument to
optionally pass a preallocated scsipi_xfer, and allocating a
scsipi_xfer before dequeueing a buffer in the various *start()
functions. If the allocation of a scsipi_xfer fails, schedule
a callout for delayed invocation of the start function. Also
reserve one page for scsipi_xfer structs, to ensure that we will
eventually have some available once pending commands complete.
Should fix PR#25670.
To generate a diff of this commit:
cvs rdiff -r1.216.2.2 -r1.216.2.3 src/sys/dev/scsipi/sd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.