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

[PATCH 3/6] 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.


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Martin Harvey <Martin.Harvey@xxxxxxxxxx>
  • Date: Tue, 20 Jul 2021 14:29:48 +0100
  • Authentication-results: esa5.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: Tue, 20 Jul 2021 14:53:35 +0000
  • Ironport-hdrordr: A9a23:lUMF4K/ptNc03VqSyDxuk+DHI+orL9Y04lQ7vn2ZKCY6TiX2ra CTdZggviMc6wx/ZJhDo7290cC7KBvhHPVOjbX5U43JYCDW/EGvK5xr55an4zCIIUzDytI=
  • Ironport-sdr: PvxUPjLtU72CH6KoI+5NI1GXxGp+PQWjUjsNVUB5MHroFkmKTeaBVLTjVdH3WdMz9gH3A3gsSU yECh1HvKqY/W6eGS7GQfpnoIJKpuTtCDG7j5lODaMaF/ZJvEii6vzPk0ygZFaRhhpAj3sq/8uz asYs9eiUOSfP14wtGUNXlOuFpQagpKT6c2w4EQ3TQFxBwhvjaxyt9Bgch8OIIGPGGRxWlZjjYr xm50RQoR1CAe+l3Wy0e0eyQO82TwFRM46gtKaQ+4INacE/g1q8Q9OzX6nk0pYb6Zk6qi5xHm+B PZwnlZzO/U1kkJaUdeiaxCkl
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

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

diff --git a/src/xenvif/frontend.c b/src/xenvif/frontend.c
index 5940e16..c27b2cd 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             TimeoutDelta = 120000;
 
     Trace("%s: ====> %s\n",
           __FrontendGetBackendPath(Frontend),
@@ -1369,7 +1370,7 @@ FrontendWaitForBackendXenbusStateChange(
 
     Timeout.QuadPart = 0;
 
-    while (*State == Old && TimeDelta < 120000) {
+    while (*State == Old && TimeDelta < TimeoutDelta) {
         PCHAR           Buffer;
         LARGE_INTEGER   Now;
 
@@ -1417,6 +1418,10 @@ FrontendWaitForBackendXenbusStateChange(
         TimeDelta = (Now.QuadPart - Start.QuadPart) / 10000ull;
     }
 
+    if (TimeDelta >= TimeoutDelta) {
+        Error("%s timed out.\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®.