diff options
| author | junyoung <junyoung@NetBSD.org> | 2002-10-18 14:31:10 +0000 |
|---|---|---|
| committer | junyoung <junyoung@NetBSD.org> | 2002-10-18 14:31:10 +0000 |
| commit | cc537c2f3a9d036365f83d53429dffebdffddd81 (patch) | |
| tree | d47e690886e7b4afb66b95ea0e863336c72f6910 /sys/dev | |
| parent | e12c9d54c03ef1f25fa691dbedcc2ad9a856ca94 (diff) | |
Add option NEW_BUFQ_STRATEGY, a new buffer queue strategy for better
system responsiness under high disk I/O load.
OK'ed by Juergen Hannken-Illjes.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ata/wd.c | 9 | ||||
| -rw-r--r-- | sys/dev/scsipi/sd.c | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index d186788f9b7..62269d1412e 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.229 2002/10/02 16:33:37 thorpej Exp $ */ +/* $NetBSD: wd.c,v 1.230 2002/10/18 14:31:13 junyoung Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -66,12 +66,13 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.229 2002/10/02 16:33:37 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.230 2002/10/18 14:31:13 junyoung Exp $"); #ifndef WDCDEBUG #define WDCDEBUG #endif /* WDCDEBUG */ +#include "opt_bufq.h" #include "rnd.h" #include <sys/param.h> @@ -279,7 +280,11 @@ wdattach(parent, self, aux) WDCDEBUG_PRINT(("wdattach\n"), DEBUG_FUNCS | DEBUG_PROBE); callout_init(&wd->sc_restart_ch); +#ifdef NEW_BUFQ_STRATEGY + bufq_alloc(&wd->sc_q, BUFQ_READ_PRIO|BUFQ_SORT_RAWBLOCK); +#else bufq_alloc(&wd->sc_q, BUFQ_DISKSORT|BUFQ_SORT_RAWBLOCK); +#endif wd->atabus = adev->adev_bustype; wd->openings = adev->adev_openings; diff --git a/sys/dev/scsipi/sd.c b/sys/dev/scsipi/sd.c index 45af738941e..9e386b95c3f 100644 --- a/sys/dev/scsipi/sd.c +++ b/sys/dev/scsipi/sd.c @@ -1,4 +1,4 @@ -/* $NetBSD: sd.c,v 1.188 2002/09/18 01:46:24 chs Exp $ */ +/* $NetBSD: sd.c,v 1.189 2002/10/18 14:31:15 junyoung Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -54,9 +54,10 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.188 2002/09/18 01:46:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.189 2002/10/18 14:31:15 junyoung Exp $"); #include "opt_scsi.h" +#include "opt_bufq.h" #include "rnd.h" #include <sys/param.h> @@ -152,7 +153,11 @@ sdattach(parent, sd, periph, ops) SC_DEBUG(periph, SCSIPI_DB2, ("sdattach: ")); +#ifdef NEW_BUFQ_STRATEGY + bufq_alloc(&sd->buf_queue, BUFQ_READ_PRIO|BUFQ_SORT_RAWBLOCK); +#else bufq_alloc(&sd->buf_queue, BUFQ_DISKSORT|BUFQ_SORT_RAWBLOCK); +#endif /* * Store information needed to contact our base driver |
