Skip to contentSkip to conversation

viostor driver. some steps toward better performance on XP.

PATCH New Vadim Rozenfeld 1 participant 1 message Oct 29, 2009 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 viostor driver. some steps toward better performance on XP.

repository: /home/vadimr/shares/kvm-guest-drivers-windows
branch: XP
commit 844cc39863ca914cf47a1fe2e8cde4ea1079753b

Author: Vadim Rozenfeld<[email protected]>
Date:   Thu Oct 29 09:34:19 2009 +0200

[PATCH] viostor driver. some steps toward better performance on XP.

viostor/virtio_stor.c +3 -0
index d363909..8b91e62 100644
@@ -1131,6 +1131,9 @@ CompleteDPC(
     }
 #endif
     CompleteSRB(DeviceExtension, Srb);
+#ifndef USE_STORPORT
+    --adaptExt->requests;
+#endif
 }
 
 #ifdef USE_STORPORT
viostor/virtio_stor.h +2 -0
index 456fa0e..c00600c 100644
@@ -105,6 +105,8 @@ typedef struct _ADAPTER_EXTENSION {
     LIST_ENTRY            complete_list;
 #ifdef USE_STORPORT
     STOR_DPC              completion_dpc;
+#else
+    ULONG                 requests;
 #endif
     BOOLEAN               has_sn;
     ULONG                 msix_vectors;
viostor/virtio_stor_hw_helper.c +3 -1
index ed6abf7..21d27cd 100644
@@ -94,9 +94,11 @@ RhelDoReadWrite(PVOID DeviceExtension,
                                       &srbExt->vbr.sg[0],
                                       srbExt->out, srbExt->in,
                                       &srbExt->vbr) == 0) {
-//FIXME
         InsertTailList(&adaptExt->list_head,&srbExt->vbr.list_entry);
         adaptExt->pci_vq_info.vq->vq_ops->kick(adaptExt->pci_vq_info.vq);
+        if(++adaptExt->requests<  adaptExt->queue_depth) {
+           ScsiPortNotification(NextLuRequest, DeviceExtension, Srb->PathId, Srb->TargetId, Srb->Lun);
+        }
         return TRUE;
     }
     return FALSE;
viostor/virtio_stor.c +3 -0
index d363909..8b91e62 100644
@@ -1131,6 +1131,9 @@ CompleteDPC(
     }
 #endif
     CompleteSRB(DeviceExtension, Srb);
+#ifndef USE_STORPORT
+    --adaptExt->requests;
+#endif
 }
 
 #ifdef USE_STORPORT
viostor/virtio_stor.h +2 -0
index 456fa0e..c00600c 100644
@@ -105,6 +105,8 @@ typedef struct _ADAPTER_EXTENSION {
     LIST_ENTRY            complete_list;
 #ifdef USE_STORPORT
     STOR_DPC              completion_dpc;
+#else
+    ULONG                 requests;
 #endif
     BOOLEAN               has_sn;
     ULONG                 msix_vectors;
viostor/virtio_stor_hw_helper.c +3 -1
index ed6abf7..21d27cd 100644
@@ -94,9 +94,11 @@ RhelDoReadWrite(PVOID DeviceExtension,
                                       &srbExt->vbr.sg[0],
                                       srbExt->out, srbExt->in,
                                       &srbExt->vbr) == 0) {
-//FIXME
         InsertTailList(&adaptExt->list_head, &srbExt->vbr.list_entry);
         adaptExt->pci_vq_info.vq->vq_ops->kick(adaptExt->pci_vq_info.vq);
+        if(++adaptExt->requests < adaptExt->queue_depth) {
+           ScsiPortNotification(NextLuRequest, DeviceExtension, Srb->PathId, Srb->TargetId, Srb->Lun);
+        }
         return TRUE;
     }
     return FALSE;