Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Add option NEW_BUFQ_STRATEGY, a new buffer queue strateg...



details:   https://anonhg.NetBSD.org/src/rev/71c8c702c0a4
branches:  trunk
changeset: 538347:71c8c702c0a4
user:      junyoung <junyoung%NetBSD.org@localhost>
date:      Fri Oct 18 14:31:10 2002 +0000

description:
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:

 sys/conf/files      |  4 +++-
 sys/dev/ata/wd.c    |  9 +++++++--
 sys/dev/scsipi/sd.c |  9 +++++++--
 3 files changed, 17 insertions(+), 5 deletions(-)

diffs (87 lines):

diff -r 85fc8006785b -r 71c8c702c0a4 sys/conf/files
--- a/sys/conf/files    Fri Oct 18 14:12:14 2002 +0000
+++ b/sys/conf/files    Fri Oct 18 14:31:10 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files,v 1.572 2002/10/15 18:14:41 junyoung Exp $
+#      $NetBSD: files,v 1.573 2002/10/18 14:31:10 junyoung Exp $
 
 #      @(#)files.newconf       7.5 (Berkeley) 5/10/93
 
@@ -23,6 +23,8 @@
 defflag                                UCONSOLE
 defflag        opt_pipe.h              PIPE_SOCKETPAIR PIPE_NODIRECT
 
+defflag        opt_bufq.h              NEW_BUFQ_STRATEGY
+
 defflag        opt_sock_counters.h     SOSEND_COUNTERS
 defflag        opt_sosend_loan.h       SOSEND_NO_LOAN
 
diff -r 85fc8006785b -r 71c8c702c0a4 sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c  Fri Oct 18 14:12:14 2002 +0000
+++ b/sys/dev/ata/wd.c  Fri Oct 18 14:31:10 2002 +0000
@@ -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 @@
        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 -r 85fc8006785b -r 71c8c702c0a4 sys/dev/scsipi/sd.c
--- a/sys/dev/scsipi/sd.c       Fri Oct 18 14:12:14 2002 +0000
+++ b/sys/dev/scsipi/sd.c       Fri Oct 18 14:31:10 2002 +0000
@@ -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 @@
 
        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



Home | Main Index | Thread Index | Old Index