kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vadim Rozenfeld <vrozenfe@redhat.com>
To: kvm@vger.kernel.org
Subject: [PATCH] viostor driver. some steps toward better performance on XP.
Date: Thu, 29 Oct 2009 09:39:48 +0200	[thread overview]
Message-ID: <4AE946C4.7030709@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1913 bytes --]



repository: /home/vadimr/shares/kvm-guest-drivers-windows
branch: XP
commit 844cc39863ca914cf47a1fe2e8cde4ea1079753b
Author: Vadim Rozenfeld<vrozenfe@redhat.com>
Date:   Thu Oct 29 09:34:19 2009 +0200

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

     Signed-off-by: Vadim Rozenfeld<vrozenfe@redhat.com>

diff --git a/viostor/virtio_stor.c b/viostor/virtio_stor.c
index d363909..8b91e62 100644
--- a/viostor/virtio_stor.c
+++ b/viostor/virtio_stor.c
@@ -1131,6 +1131,9 @@ CompleteDPC(
      }
  #endif
      CompleteSRB(DeviceExtension, Srb);
+#ifndef USE_STORPORT
+    --adaptExt->requests;
+#endif
  }

  #ifdef USE_STORPORT
diff --git a/viostor/virtio_stor.h b/viostor/virtio_stor.h
index 456fa0e..c00600c 100644
--- a/viostor/virtio_stor.h
+++ b/viostor/virtio_stor.h
@@ -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;
diff --git a/viostor/virtio_stor_hw_helper.c b/viostor/virtio_stor_hw_helper.c
index ed6abf7..21d27cd 100644
--- a/viostor/virtio_stor_hw_helper.c
+++ b/viostor/virtio_stor_hw_helper.c
@@ -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;


[-- Attachment #2: xp_performance.patch --]
[-- Type: text/plain, Size: 1559 bytes --]

diff --git a/viostor/virtio_stor.c b/viostor/virtio_stor.c
index d363909..8b91e62 100644
--- a/viostor/virtio_stor.c
+++ b/viostor/virtio_stor.c
@@ -1131,6 +1131,9 @@ CompleteDPC(
     }
 #endif
     CompleteSRB(DeviceExtension, Srb);
+#ifndef USE_STORPORT
+    --adaptExt->requests;
+#endif
 }
 
 #ifdef USE_STORPORT
diff --git a/viostor/virtio_stor.h b/viostor/virtio_stor.h
index 456fa0e..c00600c 100644
--- a/viostor/virtio_stor.h
+++ b/viostor/virtio_stor.h
@@ -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;
diff --git a/viostor/virtio_stor_hw_helper.c b/viostor/virtio_stor_hw_helper.c
index ed6abf7..21d27cd 100644
--- a/viostor/virtio_stor_hw_helper.c
+++ b/viostor/virtio_stor_hw_helper.c
@@ -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;

                 reply	other threads:[~2009-10-29  7:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AE946C4.7030709@redhat.com \
    --to=vrozenfe@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).