Port-xen archive

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

Re: Xen balloon driver rewrite



On Wed, Apr 06, 2011 at 10:21:11AM +0100, Jean-Yves Migeon wrote:
> Hi list,
> 
> So, in an attempt to add most of the missing stuff in current Xen
> balloon driver, I ended up rewriting most of the logic behind. It's
> not yet finished, but really closed to it (FYI, I am attaching a
> patch). Only the workqueue part needs to be done, it is ~ one/two
> hours of coding, then testing. The balloon will be enabled by
> default for -6.
> 
> The old design used a specific thread to queue balloon operations
> and handle inflating/deflating. The "new" driver will rather be
> workqueue(9) based, as it simplifies the locking and handling of
> errors from ballooning, especially for error feedback from
> balloon_thread. I will now simply log an error and terminate the
> worker.

I'm not sure how this is easier than just logging an error
and going back to the thread's idle loop.

> 
> The sysctl tree kern.xen.balloon has 4 nodes (values in KiB):
> - mem-max: the mem-max value associated to the domain, obtained from
> XenStore.
> - mem-min: a safeguard value, so a domain refuses to balloon memory
> below this mark (protective measure)
> - mem-target: a target for balloon's memory. May not be reached,
> especially if it it tries to go below mem-min value.
> - mem-current: the current memory reservation of the domain.
> 
> Note that balloon is always an operation that requires domain's
> cooperation.
> 
> All values are in KiB. From a user perspective, I am wondering if
> the values should be given either in bytes, or pages:
> - the Xen hypercalls use pages, of PAGE_SIZE size.
> - the XenStore stores some of these values in KiB.
> 
> I tend to be against values in pages, because they are often
> obtained from values in bytes, converted through PAGE_SHIFT shifts
> manually. Also, I assume that someday, maybe, sysctl(8) will be able
> to use dehumanize_number().

I don't think it'll be able to use strait (de)humanize_number(), some
unit will have to be specified anyway. So I'd go for KiB to stay consistent
with other parts of Xen tools.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index