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

Re: [win-pv-devel] [PATCH] Attempt to process responses on the ring


  • To: Owen Smith <owen.smith@xxxxxxxxxx>, Owen Smith <owen.smith@xxxxxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
  • Date: Tue, 17 Sep 2019 15:06:02 +0000
  • Accept-language: en-GB, en-US
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=Paul.Durrant@xxxxxxxxxx; spf=Pass smtp.mailfrom=Paul.Durrant@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Delivery-date: Tue, 17 Sep 2019 15:06:09 +0000
  • Ironport-sdr: WDAbdaIqGjKCGnux7hUYCbm0TMOI0ZnpIqIQIpGS8MdcGjVKq5g7JgnZ9/g7/C4kvv3UF3Dqzf /u0/BGCnOeRf1NoKTCyd3nKeY6iBNlIqhnl+WIJLEHc210amOP9hFX1lshwnfOONbXvoAk0ecT yGIyTQnAR4WAKKhaT9wXwfp5MHOzqfDPLJUHQd8xrxw0wUIRGMj5HtjDL/4uwEqlgas+FWOE2Z azYaHpsOud5Eqvn3m/yp/ddmJlanx4bw0QyOX9dOSPyhfWLQ/dRX9X9LkjR3bSveZPkNurUWs4 BgQ=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Thread-index: AQHVbKSJ/N/Geu9tFk29vdf30QCCA6cv+Wpw
  • Thread-topic: [PATCH] Attempt to process responses on the ring

> -----Original Message-----
> From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of 
> Owen Smith
> Sent: 16 September 2019 16:36
> To: Owen Smith <owen.smith@xxxxxxxxxx>; win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [win-pv-devel] [PATCH] Attempt to process responses on the ring
> 
> This needs to be applied after the previous 4 patches (after Rework 
> BlkifRingDisable)
> 

I have acked this. Please fold into your v2 series.

  Paul

> > -----Original Message-----
> > From: Owen Smith [mailto:owen.smith@xxxxxxxxxx]
> > Sent: 16 September 2019 16:18
> > To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> > Cc: Owen Smith <owen.smith@xxxxxxxxxx>
> > Subject: [PATCH] Attempt to process responses on the ring
> >
> > When Disabling the ring, outstanding responses need to be completed.
> > Poll the ring to complete outstanding responses if the backend is still
> > connected and valid.
> >
> > Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
> > ---
> >  src/xenvbd/ring.c | 46
> > ++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 46 insertions(+)
> >
> > diff --git a/src/xenvbd/ring.c b/src/xenvbd/ring.c index 5323243..1b980be
> > 100644
> > --- a/src/xenvbd/ring.c
> > +++ b/src/xenvbd/ring.c
> > @@ -2044,11 +2044,57 @@ BlkifRingDisable(
> >      IN  PXENVBD_BLKIF_RING  BlkifRing
> >      )
> >  {
> > +    PXENVBD_RING            Ring;
> > +    PCHAR                   Buffer;
> > +    XenbusState             State;
> > +    NTSTATUS                status;
> > +
> > +    Ring = BlkifRing->Ring;
> > +
> >      Trace("====> %u\n", BlkifRing->Index);
> >
> >      __BlkifRingAcquireLock(BlkifRing);
> >      ASSERT(BlkifRing->Enabled);
> >
> > +    status = XENBUS_STORE(Read,
> > +                          &Ring->StoreInterface,
> > +                          NULL,
> > +                          FrontendGetBackendPath(Ring->Frontend),
> > +                          "state",
> > +                          &Buffer);
> > +    if (!NT_SUCCESS(status)) {
> > +        State = XenbusStateUnknown;
> > +    } else {
> > +        State = (XenbusState) strtol(Buffer, NULL, 10);
> > +
> > +        XENBUS_STORE(Free,
> > +                     &Ring->StoreInterface,
> > +                     Buffer);
> > +    }
> > +
> > +    if (State == XenbusStateConnected) {
> > +        ULONG               Attempt;
> > +
> > +        Attempt = 0;
> > +        ASSERT3U(BlkifRing->RequestsPushed, ==, BlkifRing-
> > >RequestsPosted);
> > +        while (BlkifRing->ResponsesProcessed != BlkifRing->RequestsPushed) 
> > {
> > +            Attempt++;
> > +            if (Attempt > 100)
> > +                break;
> > +
> > +            // Try to move things along
> > +            __BlkifRingSend(BlkifRing);
> > +            (VOID) BlkifRingPoll(BlkifRing);
> > +
> > +            // We are waiting for a watch event at DISPATCH_LEVEL so
> > +            // it is our responsibility to poll the store ring.
> > +            XENBUS_STORE(Poll,
> > +                         &Ring->StoreInterface);
> > +
> > +            KeStallExecutionProcessor(1000);    // 1ms
> > +        }
> > +    }
> > +
> >      BlkifRing->Enabled = FALSE;
> >
> >      for (;;) {
> > --
> > 2.16.2.windows.1
> 
> 
> _______________________________________________
> win-pv-devel mailing list
> win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/win-pv-devel
_______________________________________________
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®.