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

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



> -----Original Message-----
> From: win-pv-devel [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On 
> Behalf Of Owen Smith
> Sent: 18 March 2019 17:05
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Owen Smith <owen.smith@xxxxxxxxxx>
> Subject: [win-pv-devel] [PATCH] Track BlkifRing->State.Count in 
> BlkifRingDisable
> 
> 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;
> -

Logically this seems like the wrong one to get rid of. The one in 
FrontendConnect() seems more out-of-place to me.

  Paul

>      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
_______________________________________________
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®.