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

Re: [win-pv-devel] [PATCH 1/2] rate limit BLKIF_OP failure log messages XSI-413


  • To: Daniel Davis <daniel.davis@xxxxxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
  • Date: Mon, 15 Jul 2019 13:42:51 +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: Daniel Davis <daniel.davis@xxxxxxxxxx>
  • Delivery-date: Mon, 15 Jul 2019 13:42:58 +0000
  • Ironport-sdr: tFYEeWi4PwDSzDUH2WiTuzVgDsDnObvX7SJ2oKS99ptO0G2KVzE7PwTK5fSaeTj+VMH2+KMacd RJU8YBKsOx4ZYOvIdg++NUXlBfdNatZuBaU/XcyIjsdKiNznU4zZgoUdkvCvrfXwsvpxfQE/6g hsQsxXRvviPrAKhfXBLfIRO25DslwRDjmOj65KldoRwq5O/ilsKBK8EnureoAhF/LMfp5I7xw0 Gs//SY8tfRPzk68JkDAPFm6kilvf0/49GWCkhiUbESPJNoxnPLhXZs/oNgp8xARaJaJmy9Rgjd dXU=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Thread-index: AQHVOw8XhUkLw66sd0GluvyLozatkqbLrvAg
  • Thread-topic: [win-pv-devel] [PATCH 1/2] rate limit BLKIF_OP failure log messages XSI-413

> -----Original Message-----
> From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of 
> Daniel Davis
> Sent: 15 July 2019 14:13
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Daniel Davis <daniel.davis@xxxxxxxxxx>
> Subject: [win-pv-devel] [PATCH 1/2] rate limit BLKIF_OP failure log messages 
> XSI-413
> 
> Signed-off-by Daniel Davis <daniel.davis@xxxxxxxxxx>
> 
> ---
>  src/xenvbd/ring.c | 25 +++++++++++++++++++------
>  1 file changed, 19 insertions(+), 6 deletions(-)
> 
> diff --git a/src/xenvbd/ring.c b/src/xenvbd/ring.c
> index 93fd920..431e1b5 100644
> --- a/src/xenvbd/ring.c
> +++ b/src/xenvbd/ring.c
> @@ -52,6 +52,7 @@
>  #include "debug.h"
>  #include "assert.h"
> 
> +

Extraneous whitespace.

>  #define XENVBD_MAX_RING_PAGE_ORDER  (4)
>  #define XENVBD_MAX_RING_PAGES       (1 << XENVBD_MAX_RING_PAGE_ORDER)
> 
> @@ -94,6 +95,7 @@ typedef struct _XENVBD_BLKIF_RING {
>      ULONG                           RequestsPushed;
>      ULONG                           ResponsesProcessed;
>      PXENBUS_DEBUG_CALLBACK          DebugCallback;
> +     LARGE_INTEGER                                   TimeOfLastErrorLog;

There appears to be whitespace damage here. Have you got hard-tabs turned off?

>  } XENVBD_BLKIF_RING, *PXENVBD_BLKIF_RING;
> 
>  typedef enum _XENVBD_STAT {
> @@ -1213,12 +1215,22 @@ __BlkifRingCompleteResponse(
> 
>      case BLKIF_RSP_ERROR:
>      default:
> -        Warning("Target[%u][%u] : %s BLKIF_RSP_ERROR\n",
> -                FrontendGetTargetId(Frontend),
> -                BlkifRing->Index,
> -                __BlkifOperationName(Request->Operation));
> -        Srb->SrbStatus = SRB_STATUS_ERROR;
> -        break;
> +     {

Style. I think prevailing style has the opening brace on the last 'case' line.

> +             LARGE_INTEGER timeNow;
> +
> +             KeQuerySystemTime(&timeNow);

Style. We don't use the bizarre Windows not-quite-camel-case. 'TimeNow' or just 
plain 'Now' would be fine.

> +
> +             //if last log message was less than 10 seconds ago
> +             if (timeNow.QuadPart - BlkifRing->TimeOfLastErrorLog.QuadPart < 
> 100000000) {

I think 100000000 will truncate at 32 bits. Add a 'ull' suffix.

> +                     Warning("Target[%u][%u] : %s BLKIF_RSP_ERROR\n",
> +                             FrontendGetTargetId(Frontend),
> +                             BlkifRing->Index,
> +                             __BlkifOperationName(Request->Operation));
> +                     KeQuerySystemTime(&BlkifRing->TimeOfLastErrorLog);
> +             }
> +             Srb->SrbStatus = SRB_STATUS_ERROR;
> +             break;
> +             }
>      }
> 
>      BlkifRingPutRequest(BlkifRing, Request);
> @@ -1229,6 +1241,7 @@ __BlkifRingCompleteResponse(
>      }
>  }
> 
> +

Another stray whitespace change.

  Paul

>  static FORCEINLINE BOOLEAN
>  BlkifRingPoll(
>      IN  PXENVBD_BLKIF_RING  BlkifRing
> --
> 2.22.0.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®.