From: kettenis Date: Wed, 2 Aug 2023 19:58:52 +0000 (+0000) Subject: Set a low water mark on scsi_xfer_pool and prime the pool. This way there X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=10c9f1ae28ead3e8d2381bb2f8f341ab5d734aa3;p=openbsd Set a low water mark on scsi_xfer_pool and prime the pool. This way there will always be some scsi_xfer structures around. Hopefully that means the pagedaemon can actually write out pages to swap if we're out of physical memory. ok krw@ --- diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 559df94fcfb..110b49628ab 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.282 2023/07/06 10:17:43 visa Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.283 2023/08/02 19:58:52 kettenis Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -138,6 +138,8 @@ scsi_init(void) /* Initialize the scsi_xfer pool. */ pool_init(&scsi_xfer_pool, sizeof(struct scsi_xfer), 0, IPL_BIO, 0, "scxspl", NULL); + pool_setlowat(&scsi_xfer_pool, 8); + pool_prime(&scsi_xfer_pool, 8); pool_init(&scsi_plug_pool, sizeof(struct scsi_plug), 0, IPL_BIO, 0, "scsiplug", NULL); }