|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH] Reduce priority of suspend thread
In cycles of repeated suspend/resume attempt to make sure other threads
get to run by:
a) Dropping the priority of the suspend thread as low as possible.
b) Deliberately waiting for DPSc on other CPUs to complete before
checking xenstore again.
Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
src/xenbus/fdo.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/xenbus/fdo.c b/src/xenbus/fdo.c
index da5cdcc..ce4d4ac 100644
--- a/src/xenbus/fdo.c
+++ b/src/xenbus/fdo.c
@@ -1462,6 +1462,9 @@ FdoSuspend(
Affinity.Mask = (KAFFINITY)1;
KeSetSystemGroupAffinityThread(&Affinity, NULL);
+ (VOID) KeSetPriorityThread(KeGetCurrentThread(),
+ LOW_PRIORITY);
+
Event = ThreadGetEvent(Self);
for (;;) {
@@ -1522,6 +1525,8 @@ FdoSuspend(
__FdoSuspendClearActive(Fdo);
+ KeFlushQueuedDpcs();
+
loop:
KeSetEvent(&Fdo->SuspendEvent, IO_NO_INCREMENT, FALSE);
}
--
2.1.1
_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |