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

[PATCH 3/5] Log waits for backend state changes.


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Martin Harvey <Martin.Harvey@xxxxxxxxxx>
  • Date: Wed, 28 Jul 2021 15:02:45 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Martin Harvey <Martin.Harvey@xxxxxxxxxx>, Martin Harvey <martin.harvey@xxxxxxxxxx>
  • Delivery-date: Wed, 28 Jul 2021 14:03:51 +0000
  • Ironport-hdrordr: A9a23:4Shadq9s1duhT89P6/Vuk+C2I+orL9Y04lQ7vn2ZLiY1TiX4ra 6TdZsguSMc5Ax6ZJhCo7u90cC7KBvhHPVOjrX5U43OYDXb
  • Ironport-sdr: Vt8yzApjK18EFPwrfKX+5jPCqkAKCHIrXQKW1eBWK5IPW/omWYBt+H2LbjqYJN6X5jBEeM/nwF 2caxDsYCjsbsb4AgOlveWKJlr2qr5Qrgvqr8T/luhnxoDvB3/m96s0oOFbCJJtITrP/PvUPJMI GlpAQ+FnzU4DZX5GkKCrk8nBT4RL4doKegF3jKpH+aJBojiqD8LTUUaXMvSSThFRgkL4YmtD/C JShtmmzV00OOgR8Hr0B1yOe8VIgFEqRcuI1S71+605xiLovDc5sKA7IAbvg61Ad6G18POl7BD/ RCVSBeef4UXBRD1F7UjrDVGs
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

In addition to preceding changes to ring disconnects, and
associated logging, we also add some logging to check
whether state change notifications are being sent in a timely
manner between frontend and backend. Also a great assistance
to customer debugging.

Signed-off-by: Martin Harvey <martin.harvey@xxxxxxxxxx>
---
 src/xenvif/frontend.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/xenvif/frontend.c b/src/xenvif/frontend.c
index 5940e16..72f448d 100644
--- a/src/xenvif/frontend.c
+++ b/src/xenvif/frontend.c
@@ -1346,6 +1346,7 @@ FrontendWaitForBackendXenbusStateChange(
     LARGE_INTEGER               Timeout;
     XenbusState                 Old = *State;
     NTSTATUS                    status;
+    const ULONGLONG             TotalTimeout = 120000;
 
     Trace("%s: ====> %s\n",
           __FrontendGetBackendPath(Frontend),
@@ -1369,7 +1370,7 @@ FrontendWaitForBackendXenbusStateChange(
 
     Timeout.QuadPart = 0;
 
-    while (*State == Old && TimeDelta < 120000) {
+    while (*State == Old && TimeDelta < TotalTimeout) {
         PCHAR           Buffer;
         LARGE_INTEGER   Now;
 
@@ -1417,6 +1418,9 @@ FrontendWaitForBackendXenbusStateChange(
         TimeDelta = (Now.QuadPart - Start.QuadPart) / 10000ull;
     }
 
+    if (TimeDelta >= TotalTimeout)
+        Error("%s timed out waiting for backend state change\n", 
__FrontendGetBackendPath(Frontend));
+
     if (Watch != NULL)
         (VOID) XENBUS_STORE(WatchRemove,
                             &Frontend->StoreInterface,
-- 
2.25.0.windows.1




 


Rackspace

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