[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxl: Wait for ballooning if free memory is increasing
On Wed, 2015-01-21 at 22:22 -0700, Mike Latimer wrote: Sorry for the delay. > @@ -2228,7 +2230,13 @@ static int freemem(uint32_t domid, > libxl_domain_build_info *b_info) > if (rc < 0) > return rc; > > - retries--; > + /* only decrement retry count if free_memkb is not increasing */ This isn't quite true -- you also reset the retry count if progress has been made. > + if (free_memkb <= free_memkb_prev) { > + retries--; I think you need to update prev here, otherwise after one successful iteration the condition is always true even if progress subsequently stalls. > + } else { > + retries = MAX_RETRIES; > + free_memkb_prev = free_memkb; ... iow the second assignment here should be after the if/else entirely. Given that this new loop can take significantly longer to fail I wonder if we should add some progress logging? xl has an xtl logger instance available so using xtl_progress might be an easy option. Maybe a separate patch though. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |