summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-07-08 23:18:56 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-07-08 23:18:56 +0000
commit2b2bb92735e1bc2a0f341794b9f1c81f3656b8c0 (patch)
treef88d1c103bed31dbbd0d8952a663e50a34a0b138 /sys
parentb8c96ef5a81fefe9a9f3fd687026b64033506207 (diff)
dont count requeued io as outstanding io. there is a 1:1 mapping
between calls to bufq_enqueue and bufq_done calls, but bufq_requeue can be called multiple times on an io in between the enqueue and done. if you keep incrementing outstanding you'll never stop sleeping for suspend. bufq_requeue can be called via interrupts, so we cannot sleep there. the problems fixed by this diff were never hit cos the adapters people are testing/running with do not cause bufq_requeue to be called. thanks to thib@ for helping me understand the code better ok thib@ deraadt@ kettenis@ tedu@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_bufq.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/kern/kern_bufq.c b/sys/kern/kern_bufq.c
index efd40b7239f..31b69639d15 100644
--- a/sys/kern/kern_bufq.c
+++ b/sys/kern/kern_bufq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_bufq.c,v 1.12 2010/07/07 10:50:50 dlg Exp $ */
+/* $OpenBSD: kern_bufq.c,v 1.13 2010/07/08 23:18:55 dlg Exp $ */
/*
* Copyright (c) 2010 Thordur I. Bjornsson <thib@openbsd.org>
*
@@ -110,9 +110,6 @@ void
bufq_requeue(struct bufq *bq, struct buf *bp)
{
mtx_enter(&bq->bufq_mtx);
- while (bq->bufq_stop) {
- msleep(&bq->bufq_stop, &bq->bufq_mtx, PRIBIO, "bufqstop", 0);
- }
bufq_requeuev[bq->bufq_type](bq, bp);
mtx_leave(&bq->bufq_mtx);
}
@@ -202,8 +199,6 @@ bufq_disksort_requeue(struct bufq *bq, struct buf *bp)
bufq = (struct buf *)bq->bufq_data;
- bq->bufq_outstanding++;
- bp->b_bq = bq;
bp->b_actf = bufq->b_actf;
bufq->b_actf = bp;
if (bp->b_actf == NULL)
@@ -258,8 +253,6 @@ bufq_fifo_requeue(struct bufq *bq, struct buf *bp)
{
struct bufq_fifo_head *head = bq->bufq_data;
- bq->bufq_outstanding++;
- bp->b_bq = bq;
SIMPLEQ_INSERT_HEAD(head, bp, b_bufq.bufq_data_fifo.bqf_entries);
}