Xen_balloon: Reserve_additional_memory: Add_memory() Errors

Home » CentOS-Virt » Xen_balloon: Reserve_additional_memory: Add_memory() Errors
CentOS-Virt 6 Comments

Hi All

Back in August there was a report of these errors popping up in dmesg, and as far as I can tell it’s still unresolved even in the latest kernel.

System RAM resource [mem 0xc8000000-0xcfffffff] cannot be added xen_balloon: reserve_additional_memory: add_memory() failed: -17

On this example its running 3.10.20-11.el6.CentOS.alt.x86_64

To replicate this just disable Dom0 memory ballooning in /etc/xen/xend-config.sxp and these errors will over time completely fill up dmesg.

This is because the amount of memory within these two sys files is different:

/sys/devices/system/xen_memory/xen_memory0/info/current_kb

/sys/devices/system/xen_memory/xen_memory0/target_kb

We can manually edit to work around the problem and stop the error but its not ideal, I would help with making a patch but don’t really know where to start!

Thanks Chris

6 thoughts on - Xen_balloon: Reserve_additional_memory: Add_memory() Errors

  • Hmmm. I definitely thought this was fixed. Can you provide your Xen command line and the kernel dmesg after boot?

    David

  • Drivers (e.g., blkback) use ballooned pages for use for foreign mappings. Depending on dom0_mem options there may be no ballooned memory available at boot and dom0’s balloon is increased by allocating pages. This decreases current_kb.

    The balloon driver then tries to decrease the balloon to match the target but it can only do this by hotplugging new memory. A bug in the balloon driver means the location of this memory overlaps with an address range that is already in use and the hotplug will fail.

    As a workaround you can boot dom0 with a suitable amount of pre-ballooned memory with:

    dom0_mem=3G,max:4G

    You may need to experiment with the max: value.

    David

  • At the moment we are using dom0_mem=3G,max:3G for example (where dom0 mem and max values are the same). So we just need to allow a slightly higher max value to leave some ballooned pages?

    The Xen4CentOS documentation also says to use the same value for dom0_mem and max.

    Thanks Chris

    _____

  • For completeness on this issue, here are the current kernel settings for all XEN kernel variables:

    CONFIG_XEN=y CONFIG_XEN_DOM0=y CONFIG_XEN_PRIVILEGED_GUEST=y CONFIG_XEN_PVHVM=y CONFIG_XEN_MAX_DOMAIN_MEMORY=500
    CONFIG_XEN_SAVE_RESTORE=y CONFIG_XEN_DEBUG_FS=y CONFIG_PCI_XEN=y CONFIG_XEN_PCIDEV_FRONTEND=y CONFIG_XEN_BLKDEV_FRONTEND=m CONFIG_XEN_BLKDEV_BACKEND=m CONFIG_XEN_BLKDEV_TAP=m CONFIG_NETXEN_NIC=m CONFIG_XEN_NETDEV_FRONTEND=m CONFIG_XEN_NETDEV_BACKEND=m CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y CONFIG_HVC_XEN=y CONFIG_HVC_XEN_FRONTEND=y CONFIG_XEN_WDT=m CONFIG_XEN_FBDEV_FRONTEND=y CONFIG_XEN_BALLOON=y
    # CONFIG_XEN_SELFBALLOONING is not set CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y CONFIG_XEN_SCRUB_PAGES=y CONFIG_XEN_DEV_EVTCHN=m CONFIG_XEN_BACKEND=y CONFIG_XENFS=m CONFIG_XEN_COMPAT_XENFS=y CONFIG_XEN_SYS_HYPERVISOR=y CONFIG_XEN_XENBUS_FRONTEND=y CONFIG_XEN_GNTDEV=m CONFIG_XEN_GRANT_DEV_ALLOC=m CONFIG_SWIOTLB_XEN=y CONFIG_XEN_TMEM=m CONFIG_XEN_PCIDEV_BACKEND=m CONFIG_XEN_PRIVCMD=m CONFIG_XEN_ACPI_PROCESSOR=m CONFIG_XEN_MCE_LOG=y CONFIG_XEN_HAVE_PVMMU=y

    As can be seen, CONFIG_XEN_SELFBALLOONING is not set … is this a problem? (That option was decided during the beginning of the Xen4CentOS process and I’m not sure if it is still valid).

    If the kernel config option is still correct and if the Xen4CentOS Docs need changing then I will make that happen.

    Thanks, Johnny Hughes

  • […]

    XEN_SELFBALLOONING enables automatic adjustment of the guest’s own target based on memory usage. I don’t think this a good idea, especially for a dom0.

    Thanks.

    I would suggest that approx. 16 MB per VM is a reasonable amount of pre-ballooned memory.

    e.g., dom0_mem=3G,max:4G would allow for approx. 64 VMs.

    David

LEAVE A COMMENT