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

Re: [win-pv-devel] [PATCH] Kick notifier DPC directly.



> -----Original Message-----
> From: win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx [mailto:win-pv-devel-
> bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf Of Owen Smith
> Sent: 22 October 2015 14:14
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Owen Smith
> Subject: [win-pv-devel] [PATCH] Kick notifier DPC directly.
> 
> EVTCHN(Trigger, ...) was changed with the FiFo event channel
> implementation, which led to a performance regression. Kicking
> the notifier does not require triggering the local end of the
> event channel, so shortcut this process by queueing the notifier
> DPC directly.
> 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>

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

> ---
>  src/xenvbd/notifier.c | 12 ++++++++++++
>  src/xenvbd/notifier.h |  5 +++++
>  src/xenvbd/pdo.c      |  8 ++++----
>  3 files changed, 21 insertions(+), 4 deletions(-)
> 
> diff --git a/src/xenvbd/notifier.c b/src/xenvbd/notifier.c
> index b812d69..e9943fa 100644
> --- a/src/xenvbd/notifier.c
> +++ b/src/xenvbd/notifier.c
> @@ -312,6 +312,18 @@ NotifierDebugCallback(
>  }
> 
>  VOID
> +NotifierKick(
> +    IN  PXENVBD_NOTIFIER            Notifier
> +    )
> +{
> +    if (Notifier->Enabled) {
> +             if (KeInsertQueueDpc(&Notifier->Dpc, NULL, NULL)) {
> +                     ++Notifier->NumDpcs;
> +        }
> +    }
> +}
> +
> +VOID
>  NotifierTrigger(
>      IN  PXENVBD_NOTIFIER            Notifier
>      )
> diff --git a/src/xenvbd/notifier.h b/src/xenvbd/notifier.h
> index 1c368e6..4cf35e7 100644
> --- a/src/xenvbd/notifier.h
> +++ b/src/xenvbd/notifier.h
> @@ -84,6 +84,11 @@ NotifierDebugCallback(
>      );
> 
>  extern VOID
> +NotifierKick(
> +    IN  PXENVBD_NOTIFIER            Notifier
> +    );
> +
> +extern VOID
>  NotifierTrigger(
>      IN  PXENVBD_NOTIFIER            Notifier
>      );
> diff --git a/src/xenvbd/pdo.c b/src/xenvbd/pdo.c
> index e00729e..198c4d3 100644
> --- a/src/xenvbd/pdo.c
> +++ b/src/xenvbd/pdo.c
> @@ -1860,7 +1860,7 @@ PdoReadWrite(
>      }
> 
>      QueueAppend(&Pdo->FreshSrbs, &SrbExt->Entry);
> -    NotifierTrigger(Notifier);
> +    NotifierKick(Notifier);
> 
>      return FALSE;
>  }
> @@ -1889,7 +1889,7 @@ PdoSyncCache(
>      }
> 
>      QueueAppend(&Pdo->FreshSrbs, &SrbExt->Entry);
> -    NotifierTrigger(Notifier);
> +    NotifierKick(Notifier);
> 
>      return FALSE;
>  }
> @@ -1918,7 +1918,7 @@ PdoUnmap(
>      }
> 
>      QueueAppend(&Pdo->FreshSrbs, &SrbExt->Entry);
> -    NotifierTrigger(Notifier);
> +    NotifierKick(Notifier);
> 
>      return FALSE;
>  }
> @@ -2252,7 +2252,7 @@ __PdoQueueShutdown(
>      PXENVBD_NOTIFIER    Notifier = FrontendGetNotifier(Pdo->Frontend);
> 
>      QueueAppend(&Pdo->ShutdownSrbs, &SrbExt->Entry);
> -    NotifierTrigger(Notifier);
> +    NotifierKick(Notifier);
>  }
> 
>  static FORCEINLINE VOID
> --
> 1.9.4.msysgit.1
> 
> 
> _______________________________________________
> win-pv-devel mailing list
> win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.