summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorbouyer <bouyer@NetBSD.org>2006-09-03 19:49:34 +0000
committerbouyer <bouyer@NetBSD.org>2006-09-03 19:49:34 +0000
commit2aee9a0f50034657ea0508b7bb6b22593884c356 (patch)
tree6d32f333450871c2c32d7b30f5821b4ac913f91d /sys/dev
parentd31581e06a1928c48d8cc0b9582a03c2e181f278 (diff)
Back out rev 1.149.
From various discussion about vndstrategy (see http://mail-index.netbsd.org/tech-kern/2005/03/29/0034.html http://mail-index.netbsd.org/tech-kern/2005/03/23/0015.html) it's not correct to tsleep() in a strategy routine, which may be called from interrupt context. Unfortunably this reopens PR/10731, PR/12189, PR/20296, PR/34293 As for what the correct fix it, this needs to be analysed deeper. I suspect throttling the caller in vnd only hides the problem; the same caller writing to some other device could exaust all buffers as well. If this driver doesn't need to allocate buffer this won't cause a deadlock, but it's bad for performances on systems with e.g. multiple drives. Also, others stacked block device drivers may also have this issue.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/vnd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index d8bc20eb161..54d13afbb43 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.149 2006/08/27 18:45:20 christos Exp $ */
+/* $NetBSD: vnd.c,v 1.150 2006/09/03 19:49:34 bouyer Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.149 2006/08/27 18:45:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.150 2006/09/03 19:49:34 bouyer Exp $");
#if defined(_KERNEL_OPT)
#include "fs_nfs.h"
@@ -507,9 +507,6 @@ vndstrategy(struct buf *bp)
if (vnddebug & VDB_FOLLOW)
printf("vndstrategy(%p): unit %d\n", bp, unit);
#endif
- while (vnd->sc_maxactive > 0 && vnd->sc_active >= vnd->sc_maxactive) {
- tsleep(&vnd->sc_tab, PRIBIO, "vndac", 0);
- }
BUFQ_PUT(vnd->sc_tab, bp);
wakeup(&vnd->sc_tab);
splx(s);