|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH 1/3] BSOD if initial balloon thread has not completed within 20 minutes
Since there is no way of reporting balloon failures to the toolstack,
the only way of stopping a VM from attempting to balloon indefinitely
is to BSOD after a large timeout.
Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
src/xenbus/fdo.c | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/src/xenbus/fdo.c b/src/xenbus/fdo.c
index 9c9e380..722a4b3 100644
--- a/src/xenbus/fdo.c
+++ b/src/xenbus/fdo.c
@@ -3356,29 +3356,31 @@ not_active:
goto fail8;
if (Fdo->BalloonInterface.Interface.Context != NULL) {
- BOOLEAN Warned;
+ LARGE_INTEGER Timeout;
ASSERT(__FdoIsActive(Fdo));
- Warned = FALSE;
+ // Balloon should complete within 10s
+ Timeout.QuadPart = TIME_RELATIVE(TIME_S(10));
- for (;;) {
- LARGE_INTEGER Timeout;
+ status = KeWaitForSingleObject(&Fdo->BalloonEvent,
+ Executive,
+ KernelMode,
+ FALSE,
+ &Timeout);
+ if (status == STATUS_TIMEOUT) {
+ Warning("waiting for balloon\n");
- Timeout.QuadPart = TIME_RELATIVE(TIME_S(BALLOON_PAUSE));
+ // Wait for up to 20mins (total) before BSOD
+ Timeout.QuadPart = TIME_RELATIVE(TIME_S(1190ll));
status = KeWaitForSingleObject(&Fdo->BalloonEvent,
- Executive,
- KernelMode,
- FALSE,
- &Timeout);
- if (status != STATUS_TIMEOUT)
- break;
-
- if (!Warned) {
- Warning("waiting for balloon\n");
- Warned = TRUE;
- }
+ Executive,
+ KernelMode,
+ FALSE,
+ &Timeout);
+ Error("Waited for Balloon (%08x)\n", status);
+ BUG_ON(status == STATUS_TIMEOUT);
}
}
--
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |