]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Pre-allocate one extra request per processing thread.
authormav <mav@FreeBSD.org>
Sun, 15 Mar 2015 22:44:53 +0000 (22:44 +0000)
committermav <mav@FreeBSD.org>
Sun, 15 Mar 2015 22:44:53 +0000 (22:44 +0000)
Processing threads call callbacks before freeing requests.  As result,
new requests may arrive before old ones are freed.

MFC after: 2 weeks

usr.sbin/bhyve/block_if.c

index 58960ca0c757ff41838cc60eba831133b28b041b..b8b27a659df89189d8c6f3566b129216f0a48bf3 100644 (file)
@@ -54,8 +54,8 @@ __FBSDID("$FreeBSD$");
 
 #define BLOCKIF_SIG    0xb109b109
 
-#define BLOCKIF_MAXREQ 64
 #define BLOCKIF_NUMTHR 8
+#define BLOCKIF_MAXREQ (64 + BLOCKIF_NUMTHR)
 
 enum blockop {
        BOP_READ,