From patchwork Thu Oct 29 07:39:48 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Rozenfeld X-Patchwork-Id: 56405 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9T7drCI011759 for ; Thu, 29 Oct 2009 07:39:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751032AbZJ2Hjq (ORCPT ); Thu, 29 Oct 2009 03:39:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751614AbZJ2Hjq (ORCPT ); Thu, 29 Oct 2009 03:39:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47278 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750889AbZJ2Hjq (ORCPT ); Thu, 29 Oct 2009 03:39:46 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9T7dplI026357 for ; Thu, 29 Oct 2009 03:39:51 -0400 Received: from localhost.localdomain (vpn-6-121.tlv.redhat.com [10.35.6.121]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9T7dmAX006380 for ; Thu, 29 Oct 2009 03:39:50 -0400 Message-ID: <4AE946C4.7030709@redhat.com> Date: Thu, 29 Oct 2009 09:39:48 +0200 From: Vadim Rozenfeld User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Thunderbird/3.0b4 MIME-Version: 1.0 To: kvm@vger.kernel.org Subject: [PATCH] viostor driver. some steps toward better performance on XP. X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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;