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

Re: [win-pv-devel] [PATCH 8/9] Move query of "multi-queue-max-queues" to driver.c



> -----Original Message-----
> From: win-pv-devel [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On
> Behalf Of Owen Smith
> Sent: 29 May 2018 11:07
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Owen Smith <owen.smith@xxxxxxxxxx>
> Subject: [win-pv-devel] [PATCH 8/9] Move query of "multi-queue-max-
> queues" to driver.c
> 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>

Acked-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ---
>  src/xenvbd/driver.c   | 22 ++++++++++++++++++++++
>  src/xenvbd/driver.h   |  5 +++++
>  src/xenvbd/frontend.c | 30 +++++-------------------------
>  3 files changed, 32 insertions(+), 25 deletions(-)
> 
> diff --git a/src/xenvbd/driver.c b/src/xenvbd/driver.c
> index 2e9ba54..fc1c169 100644
> --- a/src/xenvbd/driver.c
> +++ b/src/xenvbd/driver.c
> @@ -320,6 +320,28 @@ DriverGetFeatureName(
>             NULL;
>  }
> 
> +ULONG
> +DriverGetMaxQueues(
> +    VOID
> +    )
> +{
> +    ULONG   Override;
> +    ULONG   MaxQueues;
> +
> +    MaxQueues =
> KeQueryActiveProcessorCountEx(ALL_PROCESSOR_GROUPS);
> +
> +    if (DriverGetFeatureOverride(FeatureMultiQueueMaxQueues,
> +                                 &Override)) {
> +        if (Override < MaxQueues)
> +            MaxQueues = Override;
> +    }
> +
> +    if (MaxQueues == 0)
> +        MaxQueues = 1;
> +
> +    return MaxQueues;
> +}
> +
>  DRIVER_INITIALIZE   DriverEntry;
> 
>  NTSTATUS
> diff --git a/src/xenvbd/driver.h b/src/xenvbd/driver.h
> index 5a24c4a..c2fd44a 100644
> --- a/src/xenvbd/driver.h
> +++ b/src/xenvbd/driver.h
> @@ -100,4 +100,9 @@ DriverGetFeatureName(
>      IN  XENVBD_FEATURE  Feature
>      );
> 
> +extern ULONG
> +DriverGetMaxQueues(
> +    VOID
> +    );
> +
>  #endif // _XENVBD_DRIVER_H
> diff --git a/src/xenvbd/frontend.c b/src/xenvbd/frontend.c
> index fd2c247..f6bd30c 100644
> --- a/src/xenvbd/frontend.c
> +++ b/src/xenvbd/frontend.c
> @@ -1867,29 +1867,6 @@ fail1:
>      return status;
>  }
> 
> -static VOID
> -FrontendSetMaxQueues(
> -    IN  PXENVBD_FRONTEND    Frontend
> -    )
> -{
> -    ULONG                   FrontendMaxQueues;
> -
> -    Frontend->MaxQueues =
> KeQueryActiveProcessorCountEx(ALL_PROCESSOR_GROUPS);
> -
> -    if (DriverGetFeatureOverride(FeatureMultiQueueMaxQueues,
> -                                 &FrontendMaxQueues)) {
> -        if (FrontendMaxQueues < Frontend->MaxQueues)
> -            Frontend->MaxQueues = FrontendMaxQueues;
> -    }
> -
> -    if (Frontend->MaxQueues == 0)
> -        Frontend->MaxQueues = 1;
> -
> -    Verbose("Target[%u] MaxQueues %u\n",
> -            __FrontendGetTargetId(Frontend),
> -            Frontend->MaxQueues);
> -}
> -
>  NTSTATUS
>  FrontendCreate(
>      IN  PXENVBD_TARGET      Target,
> @@ -1917,8 +1894,11 @@ FrontendCreate(
>      Frontend->DiskInfo.SectorSize = 512; // default sector size
>      Frontend->BackendDomain = DOMID_INVALID;
> 
> -    FrontendSetMaxQueues(Frontend);
> -
> +    Frontend->MaxQueues = DriverGetMaxQueues();
> +    Verbose("Target[%u] MaxQueues %u\n",
> +            __FrontendGetTargetId(Frontend),
> +            Frontend->MaxQueues);
> +
>      status = RtlStringCbPrintfA(Frontend->FrontendPath,
>                                  sizeof(Frontend->FrontendPath),
>                                  "device/vbd/%u",
> --
> 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®.