]> xenbits.xensource.com Git - pvdrivers/win/xenvbd.git/commitdiff
Back-port rsp_event manipulation changes from master staging-8.2
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 24 Jul 2018 14:46:22 +0000 (15:46 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Tue, 24 Jul 2018 14:49:11 +0000 (15:49 +0100)
Rather than updating rsp_event at the end of every poll, the code in
master sets it to req_prod_pvt during submission to attempt to defer events
until the last request has been processed.

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

index 7cf5c84331e8836a46e1a45d240b1e09a0ca8d9a..b4688e727632c45e3b8dc6a7387439280a077855 100644 (file)
@@ -549,7 +549,6 @@ BlockRingPoll(
         KeMemoryBarrier();
 
         BlockRing->FrontRing.rsp_cons = rsp_cons;
-        BlockRing->SharedRing->rsp_event = rsp_cons + 1;
     }
 
 done:
@@ -575,7 +574,7 @@ BlockRingSubmit(
     req = RING_GET_REQUEST(&BlockRing->FrontRing, BlockRing->FrontRing.req_prod_pvt);
     __BlockRingInsert(BlockRing, Request, req);
     KeMemoryBarrier();
-    ++BlockRing->FrontRing.req_prod_pvt;
+    BlockRing->SharedRing->rsp_event = ++BlockRing->FrontRing.req_prod_pvt;
 
     RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&BlockRing->FrontRing, Notify);
     KeReleaseSpinLock(&BlockRing->Lock, Irql);