Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern bufq_priocscan_get: don't update state in the case ...
details: https://anonhg.NetBSD.org/src/rev/70f8c5ce9602
branches: trunk
changeset: 574522:70f8c5ce9602
user: yamt <yamt%NetBSD.org@localhost>
date: Thu Mar 03 05:00:22 2005 +0000
description:
bufq_priocscan_get: don't update state in the case of !remove. fix BUFQ_PEEK.
diffstat:
sys/kern/bufq_priocscan.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r cf752f54fd7d -r 70f8c5ce9602 sys/kern/bufq_priocscan.c
--- a/sys/kern/bufq_priocscan.c Thu Mar 03 04:39:37 2005 +0000
+++ b/sys/kern/bufq_priocscan.c Thu Mar 03 05:00:22 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bufq_priocscan.c,v 1.3 2004/11/25 04:52:24 yamt Exp $ */
+/* $NetBSD: bufq_priocscan.c,v 1.4 2005/03/03 05:00:22 yamt Exp $ */
/*-
* Copyright (c)2004 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bufq_priocscan.c,v 1.3 2004/11/25 04:52:24 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bufq_priocscan.c,v 1.4 2005/03/03 05:00:22 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -238,7 +238,9 @@
/*
* XXX account only by number of requests. is it good enough?
*/
- pq->q_burst--;
+ if (remove) {
+ pq->q_burst--;
+ }
} else {
/*
* no queue was selected due to burst counts
@@ -256,9 +258,11 @@
/*
* reset burst counts
*/
- for (i = 0; i < PRIOCSCAN_NQUEUE; i++) {
- pq = &q->bq_queue[i];
- pq->q_burst = priocscan_burst[i];
+ if (remove) {
+ for (i = 0; i < PRIOCSCAN_NQUEUE; i++) {
+ pq = &q->bq_queue[i];
+ pq->q_burst = priocscan_burst[i];
+ }
}
/*
Home |
Main Index |
Thread Index |
Old Index