Subject: Re: kern/34293 vnd deadlocks on I/O buffers
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Michael van Elst <mlelstv@serpens.de>
List: netbsd-bugs
Date: 08/27/2006 17:50:03
The following reply was made to PR kern/34293; it has been noted by GNATS.
From: Michael van Elst <mlelstv@serpens.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/34293 vnd deadlocks on I/O buffers
Date: Sun, 27 Aug 2006 19:45:47 +0200
Using a separate pool for nested buffers helps a little, but
the same condition also prevents normal buffers from being
allocated leading to the situation similar to the one described
in kern/10731 and kern/20296.
The following patch works against the root cause, which is the
exhaustion of buffers.
Index: vnd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/vnd.c,v
retrieving revision 1.148
diff -u -r1.148 vnd.c
--- vnd.c 21 Jul 2006 16:48:48 -0000 1.148
+++ vnd.c 27 Aug 2006 17:42:54 -0000
@@ -507,6 +507,9 @@
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);
--
Michael van Elst
Internet: mlelstv@serpens.de
"A potential Snark may lurk in every tree."