[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XENBUS PATCH] Kick the balloon thread in FdoStartDevice
On 17/06/2025 08:54, Paul Durrant wrote: > On 13/06/2025 19:30, Tu Dinh wrote: >> Xenbus currently doesn't apply the dynamic memory targets at boot time. >> > > How so? > > The xenstore watch on memory/target signals the balloon thread's event > so the watch registration in __FdoD3ToD0() should always wake the thread > (since any watch registration triggers a spurious watch event). The problem is timing-related: FdoD3ToD0 sets the watch before setting power state to D0, but the watch thread goes to sleep if it's not in D0 power state. Also, my VMs won't apply the memory target at boot without this patch. > >> Force the balloon thread to update memory targets at boot. >> >> Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx> >> --- >> src/xenbus/fdo.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/src/xenbus/fdo.c b/src/xenbus/fdo.c >> index 3a4a1a2..c2e69fa 100644 >> --- a/src/xenbus/fdo.c >> +++ b/src/xenbus/fdo.c >> @@ -3949,6 +3949,9 @@ not_active: >> ASSERT(__FdoIsActive(Fdo)); >> + KeClearEvent(&Fdo->BalloonEvent); >> + ThreadWake(Fdo->BalloonThread); >> + >> // >> // Balloon inflation should complete within a reasonable >> // time (otherwise the target is probably unreasonable). > Best regards, Ngoc Tu Dinh | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |