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

Re: [win-pv-devel] [PATCH 2/3] Prevent Schedule from preparing every outstanding SRB


  • To: Owen Smith <owen.smith@xxxxxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
  • Date: Thu, 5 Sep 2019 08:19:18 +0000
  • Accept-language: en-GB, en-US
  • Authentication-results: esa6.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
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Thu, 05 Sep 2019 08:19:24 +0000
  • Ironport-sdr: vNQYQ2nd0TYQjsQSWLKQy9fOG+dVE0QL5HDtKH3eV/8oWczy8/D2UJXcRm2f+cFA4urEuAzo4Z 0Mx47IB00CoPqaUDksd0HLUhz+0busN29cFpeef9d9b9FkCkKj/sm3t47QJcjVkm7dAFBSSMIh 1EzVhmChpm630WI9LHxTDoaDH3ALBm9Bt83kZyq3VdBo5hgiduSME9kFtrwBTzIucaqiw66yZY PukTJxa5WGBPXA0tpXQTh2EeRttTvsLBaDlF6zlfdJHhRKzX6JdYLkeju7450xZEIjdrsPGNYR 6+g=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Thread-index: AQHVYmYKFQQcVaOQ+0SJbqWi46k83accv6lA
  • Thread-topic: [win-pv-devel] [PATCH 2/3] Prevent Schedule from preparing every outstanding SRB

> -----Original Message-----
> From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of 
> Owen Smith
> Sent: 03 September 2019 15:43
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Owen Smith <owen.smith@xxxxxxxxxx>
> Subject: [win-pv-devel] [PATCH 2/3] Prevent Schedule from preparing every 
> outstanding SRB
> 
> Returning a fail code from BlkifRingPostRequests will make the
> BlkifRingSchedule loop try a poll for responses, and exit the loop if
> no space is made available on the ring. This prevents the loop from
> proceeding to prepare the next queued SRB.
> 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
> ---
>  src/xenvbd/ring.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/xenvbd/ring.c b/src/xenvbd/ring.c
> index 74426f1..c8ad87d 100644
> --- a/src/xenvbd/ring.c
> +++ b/src/xenvbd/ring.c
> @@ -1132,12 +1132,11 @@ __BlkifRingPostRequests(
> 
>          InsertTailList(&BlkifRing->SubmittedList, ListEntry);
> 
> +        BlkifRing->Front.req_prod_pvt = req_prod;
>          if (RING_SLOTS_AVAILABLE(&BlkifRing->Front, req_prod, rsp_cons) <= 1)

Why <= 1?

> -            break;
> +            goto fail1;
>      }
> 
> -    BlkifRing->Front.req_prod_pvt = req_prod;
> -

Also this could stay here if you simply drop out of the loop with a break...

>      return STATUS_SUCCESS;

...and this was something like:

(enough ring slots available) ? STATUS_SUCCESS : STATUS_ALLOTTED_SPACE_EXCEEDED;

> 
>  fail1:

...and then I think you could get rid of this.

  Paul

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