NetBSD/sys/dev/scsipi
bouyer 80620a83a7 Improve handling of memory shortage, to fix problems like:
sd3(mpt0:0:1:0): unable to allocate scsipi_xfer
sd3: not queued, error 12
Havard Eidnes's analysis of this problem is that the scsipi_xfer pool is
competing for resources with other pools, including the the inode and vnode
pools which can grow quite large.

*_scsipi_cmd(): don't biodone the buffer if scsipi_make_xs() fails, let the
   caller deal with the problem
start function of block devices drivers: dequeue the buffer after the
   scsipi_command() call. If scsipi_command() fails with ENOMEM don't dequeue
   the buffer, and schedule a callout to call the start function after
   some delay.
scsipi_init(): prime the scsipi_xfer_pool with one page. This ensure that
   there is always some scsipi_xfer to play with. If scsipi_command() fails
   because of pool_get(), we're sure there will be resources available later,
   when the pending commands have completed.

Reviewed by Jason Thorpe and Havard Eidnes.
Todo: remove the "unable to allocate scsipi_xfer" and "not queued, error %d"
printfs, but I choose to keep them for now, to help make sure the code does
what it should.
2004-08-27 20:37:28 +00:00
..
Makefile
atapi_base.c Improve handling of memory shortage, to fix problems like: 2004-08-27 20:37:28 +00:00
atapi_tape.h
atapi_wdc.c
atapiconf.c
atapiconf.h
cd.c Improve handling of memory shortage, to fix problems like: 2004-08-27 20:37:28 +00:00
cdvar.h Improve handling of memory shortage, to fix problems like: 2004-08-27 20:37:28 +00:00
ch.c
files.scsipi
if_se.c
scsi_all.h
scsi_base.c Improve handling of memory shortage, to fix problems like: 2004-08-27 20:37:28 +00:00
scsi_changer.h
scsi_ctron_ether.h
scsi_disk.h
scsi_iu.h
scsi_message.h
scsi_scanner.h
scsi_tape.h
scsiconf.c
scsiconf.h
scsipi_all.h
scsipi_base.c Improve handling of memory shortage, to fix problems like: 2004-08-27 20:37:28 +00:00
scsipi_base.h
scsipi_cd.h
scsipi_debug.h
scsipi_disk.h
scsipi_ioctl.c
scsipi_verbose.c
scsipiconf.c
scsipiconf.h
sd.c Improve handling of memory shortage, to fix problems like: 2004-08-27 20:37:28 +00:00
sdvar.h Improve handling of memory shortage, to fix problems like: 2004-08-27 20:37:28 +00:00
ses.c
ses.h
ss.c Improve handling of memory shortage, to fix problems like: 2004-08-27 20:37:28 +00:00
ss_mustek.c Improve handling of memory shortage, to fix problems like: 2004-08-27 20:37:28 +00:00
ss_mustek.h
ss_scanjet.c Improve handling of memory shortage, to fix problems like: 2004-08-27 20:37:28 +00:00
ssvar.h Improve handling of memory shortage, to fix problems like: 2004-08-27 20:37:28 +00:00
st.c Improve handling of memory shortage, to fix problems like: 2004-08-27 20:37:28 +00:00
st_atapi.c
st_scsi.c
stvar.h Improve handling of memory shortage, to fix problems like: 2004-08-27 20:37:28 +00:00
uk.c