[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH] Track BlkifRing->State.Count in BlkifRingDisable


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Mon, 18 Mar 2019 17:04:54 +0000
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Mon, 18 Mar 2019 17:05:54 +0000
  • Ironport-data: A9a23:TNtIyKMmQIKV8tLvrXNrnJaZCvKYJRDAM55BO52PyJCr6kNPhQwfTq TBL/dnbtx/x057Q/uPADH/FPCkpl8f8AM3+4Qz4Cmlxhbt+NFc/buYmR6G8IdgURwoKwR4Ra AXmrs0gIBSRQZ5XWTX6fSDvT1MIf0x5Z9G0KJI2vcNrC+OpkvgDRBcJnpxdwvPfNNkwveZwo m46jx4VfZauwuDcCfgKL0JIrwvSNutYZtIA4/sNxD9nVxU6/Jk/mtTmGrD45QD4mIErTMEek xHAMjOR2qrWt187IVxUKjQP5zyLje+UBho4JNv2XqQvdw/omubtOAlOw9o5W7351St2d931C BF3sQ6BRrCM+ikutrMYQZ6eXwusyzvLpdt9fL3lnGpLDtgxJxDatcq9uDmZYfxUUcLTq9gMk 7ZYCX2m8ByYf1dqo/Xb0d7RLirdBuip+R7v6B0nOZupAl1lIAEOanUPLBRsr/JHZBiBYIJEL 0KONpt6Ok7tDug5CiKkNRDiUe40ezT2fR3Wp06a0U5/JJ/Dc+iTCp/ImJgp1dMT+d/GuKpeP 1s96Adxd1HQJ4xhP1J+0yH44byICxzOjksVJ5yauDxD/YMgybw21L6Wn/dl3YdaqcW2/plW+ kMooEu+wMrkMfhe9RSlsRzKUVBo1shxmBjduYwD6spPlT/cAvzVM3sEx6c5MbAzrObLEUz1M z8ezI9T+qpRcbelk1YNuawUFkYvJVuCcQ/87eZj6tcCVijPATF2Fc4zog0TyEYF1u0NS4Dbi AVKbu4XmWQ+i2mUWIGb3gamS6nuX/pS3iMUnjVaz4rmFSK97FrmkDbNktnMsO7YXaOlYpSY9 WdNNmfrGkBO4smsbWvZcNNHcgSIvPv6AKNT2950VWRbDF7NL3+F/PLegfnGY5ozI42Q+/+p7 7iClFy+GqOlMLYq3ZlBeDbnTLV8bH71lVHzcn4MwWGxyay/moXSjHAIE5Mg7CCBkLYCX48Ap g5GHBF8rOXuEiozcv9sWrfSK2IpndFVxhPdp4FLZZZ6Z/H8GKwM9LUefPl+v6e06DpMfFC6u GAOCw9N9BVk97LnZVYdh9OagmG5gCrwC9NU2BB5h8lZ0GRDk9DoKS8UD9XvEdJGlX0v/CSQk CkWFPBavnWOr5KUJXT8pu02CBdeAsT+G/j075SSBNL3ZqUp9vKUk+w0GDh2SJqhPYpib0y2z qR6wbWwXk5nOGRRExq2pv/LOy/nIKSviUb9PySGB/2CTOtsMBMKnjNWZlmoo3/4LxGAeHp8R XUh5+42VMVqoM1kJXp1Na9ZhWjfdfrZ8DLZT7JnL838sZ2nJrrJDkqGczgt2HY36h5VS4Ovp wRwajriKZF8JWAdmgX3fxMwwWEG30CVbxtykCP59oixzZSicP15xRlAhbXn3ZGosggazSvOv LhQR4TlbzHP05CcAUViV0am+dMT1EsdIZWY6Tsi0tYGUFObJe7lW/Oz88vlPMk+Vptv/nMwN BdCoahTGCsplxoU8KZEA065b+iOx4r9Q1NbeXG46pfTjigFtQQxJayhe+R4yjeZO5XKz5QBz dx2FM7ylNvOzva9AlBVqxaL0KE3S2wtuW6EXRC2K4pjIq8H4XWajNDMLwDhTZ8gZCsCJ71/4 zFNFJ/II247OQLZFwfsjW+qZV3EfGqdzRCCjBqTw==
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

Also fixes some missing logging and duplicate xenstore writes

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/xencrsh/frontend.c |  5 +++++
 src/xenvbd/adapter.c   |  1 +
 src/xenvbd/frontend.c  |  5 +++++
 src/xenvbd/ring.c      | 16 +++-------------
 4 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/src/xencrsh/frontend.c b/src/xencrsh/frontend.c
index c2e40e3..78c90d9 100644
--- a/src/xencrsh/frontend.c
+++ b/src/xencrsh/frontend.c
@@ -666,6 +666,11 @@ __WriteRing(
         if (!NT_SUCCESS(Status))
             goto abort;
 
+        Status = StoreWrite(Transaction, Frontend->FrontendPath,
+                        "multi-queue-num-queues", "1");
+        if (!NT_SUCCESS(Status))
+            goto abort;
+
         Status = StoreTransactionEnd(Transaction, TRUE);
         if (Status == STATUS_RETRY)
             continue;
diff --git a/src/xenvbd/adapter.c b/src/xenvbd/adapter.c
index f42f585..392a35f 100644
--- a/src/xenvbd/adapter.c
+++ b/src/xenvbd/adapter.c
@@ -1975,6 +1975,7 @@ AdapterHwStartIo(
     BOOLEAN                 WasQueued = FALSE;
     PXENVBD_TARGET          Target;
 
+    InterlockedIncrement((PLONG)&Adapter->StartIo);
     Target = AdapterGetTarget(Adapter, Srb->TargetId);
     if (Target == NULL) {
         Srb->SrbStatus = SRB_STATUS_NO_DEVICE;
diff --git a/src/xenvbd/frontend.c b/src/xenvbd/frontend.c
index b12e122..d2f7839 100644
--- a/src/xenvbd/frontend.c
+++ b/src/xenvbd/frontend.c
@@ -1628,6 +1628,11 @@ FrontendDebugCallback(
                  &Frontend->DebugInterface,
                  "State: %s\n",
                  __XenvbdStateName(Frontend->State));
+    XENBUS_DEBUG(Printf,
+                 &Frontend->DebugInterface,
+                 "Queues: u / %u\n",
+                 __FrontendGetNumQueues(Frontend),
+                 __FrontendGetMaxQueues(Frontend));
 
     XENBUS_DEBUG(Printf,
                  &Frontend->DebugInterface,
diff --git a/src/xenvbd/ring.c b/src/xenvbd/ring.c
index 66dcfec..5886482 100644
--- a/src/xenvbd/ring.c
+++ b/src/xenvbd/ring.c
@@ -2085,6 +2085,7 @@ BlkifRingDisable(
 
         ListEntry = RemoveHeadList(&BlkifRing->State.List);
         ASSERT3P(ListEntry, != , &BlkifRing->State.List);
+        --BlkifRing->State.Count;
 
         Request = CONTAINING_RECORD(ListEntry,
                                     XENVBD_REQUEST,
@@ -2504,16 +2505,6 @@ RingStoreWrite(
         ++Index;
     }
 
-    status = XENBUS_STORE(Printf,
-                          &Ring->StoreInterface,
-                          Transaction,
-                          FrontendGetFrontendPath(Ring->Frontend),
-                          "multi-queue-num-queues",
-                          "%u",
-                          NumQueues);
-    if (!NT_SUCCESS(status))
-        goto fail2;
-
     if (Ring->Order != 0) {
         status = XENBUS_STORE(Printf,
                               &Ring->StoreInterface,
@@ -2523,7 +2514,7 @@ RingStoreWrite(
                               "%u",
                               Ring->Order);
         if (!NT_SUCCESS(status))
-            goto fail3;
+            goto fail2;
     }
 
     status = XENBUS_STORE(Printf,
@@ -2533,11 +2524,10 @@ RingStoreWrite(
                           "protocol",
                           XEN_IO_PROTO_ABI);
     if (!NT_SUCCESS(status))
-        goto fail4;
+        goto fail3;
 
     return STATUS_SUCCESS;
 
-fail4:
 fail3:
 fail2:
 fail1:
-- 
2.16.2.windows.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.