Source-Changes archive

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

CVS commit: src/sys/arch



Module Name:    src
Committed By:   jym
Date:           Mon Apr 18 01:36:25 UTC 2011

Modified Files:
        src/sys/arch/amd64/conf: XEN3_DOM0 XEN3_DOMU
        src/sys/arch/i386/conf: XEN3_DOM0 XEN3_DOMU
        src/sys/arch/xen/conf: files.xen
        src/sys/arch/xen/xen: balloon.c
        src/sys/arch/xen/xenbus: xenbus_probe.c

Log Message:
Large rewrite of the balloon driver. This one:

- turns balloon into a driver that attaches to xenbus(4). This allows to
disable the functionality either at compile time or boot time via
userconf(4). Driver can implement detach or pmf(9) hooks if deemed
necessary.

- keeps Cherry's locking model, but simplify it a bit. There is now
only one target value serialized inside balloon, we do not feedback
alternative value to Xenstore (clients are not expected to see its value
evolve behind their back, and can't do much about that either)

- implements min threshold; this is an admin-settable value that tells
driver to "not balloon below this threshold." This can be used by domain
to keep memory reservations, useful if activity is expected in the near
future.

- in addition to min threshold, the driver implements internally a
safeguard value (uvmexp.freemin + 1MiB), so that admin cannot
inadvertently set min to a very low value forcing domain into heavy
memory pressure and swapping.

- create the sysctl(8) kern.xen.balloon tree. 4 nodes are actually present
(values are in KiB):
   - min: (rw) an admin-settable value that prevents ballooning below this
          mark
   - max: (ro) the maximum size for reservation, as set by xm(1) mem-max.
   - current: (ro) the current reservation for domain.
   - target:  (rw) the targetted reservation for domain.

- fix a few limitations here and there, most notably the max_reservation
hypercall, and KiB vs pages representations at interfaces.

The driver is still turned off by default. Enabling it would need more
approval, especially from bouyer@, cherry@ and cegger@.

FWIW: tested it two days long, from amd64 dom0 (with dom0 ballooning
enabled for xend), and bunch of domUs. Did not notice anything suspicious.

XXX it still has one big limitation: it cannot hotplug memory pages in
uvm(9) if they were not present beforehand. Example: ballooning above
physmem will give more pages to domain but it won't use it to serve
allocations, unless we teach uvm(9) how to handle the extra pages.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amd64/conf/XEN3_DOMU
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/i386/conf/XEN3_DOM0
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/i386/conf/XEN3_DOMU
cvs rdiff -u -r1.115 -r1.116 src/sys/arch/xen/conf/files.xen
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/xen/xen/balloon.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/xen/xenbus/xenbus_probe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index