]> xenbits.xensource.com Git - pvdrivers/win/xenvbd.git/commitdiff
Set per-disk queue depth
authorPaul Durrant <paul.durrant@citrix.com>
Fri, 7 Aug 2015 16:03:16 +0000 (17:03 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Fri, 7 Aug 2015 16:03:16 +0000 (17:03 +0100)
Windows apparently defaults to a queue depth of 20, which is a bit on the
small side. This patch sets the value to the maximum possible, which is
apparently 254 instead of the documented 255.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenvbd/driver.h
src/xenvbd/pdo.c

index 0bbf6cbab2e19ee031a4a767a9252bf35eb58dc9..d59f05326036e4365a03f7781a874ffa2f4a5da5 100644 (file)
@@ -46,6 +46,7 @@
 #define XENVBD_MAX_SEGMENTS_PER_SRB     (XENVBD_MAX_REQUESTS_PER_SRB * XENVBD_MAX_SEGMENTS_PER_REQUEST)
 #define XENVBD_MAX_TRANSFER_LENGTH      (XENVBD_MAX_SEGMENTS_PER_SRB * PAGE_SIZE)
 #define XENVBD_MAX_PHYSICAL_BREAKS      (XENVBD_MAX_SEGMENTS_PER_SRB - 1)
+#define XENVBD_MAX_QUEUE_DEPTH          (254)
 
 #define XENVBD_MIN_GRANT_REFS           (XENVBD_MAX_SEGMENTS_PER_SRB)
 
index 587b2f237ee62d74440c2c6475935edac3f9adce..b854afc6d742c63c2c6163c808e27908deab5f58 100644 (file)
@@ -2197,6 +2197,12 @@ __PdoExecuteScsi(
         break;
 
     case SCSIOP_INQUIRY:
+        if (!StorPortSetDeviceQueueDepth(PdoGetFdo(Pdo),
+                                         0,
+                                         (UCHAR)PdoGetTargetId(Pdo),
+                                         0,
+                                         XENVBD_MAX_QUEUE_DEPTH))
+            Verbose("Target[%d] : Failed to set queue depth\n");
         PdoInquiry(PdoGetTargetId(Pdo), FrontendGetInquiry(Pdo->Frontend), Srb, Pdo->DeviceType);
         break;
     case SCSIOP_MODE_SENSE: