libvirt/src/util
Peter Krempa fa006c4fdd qemu: Fix setting of memory tunables
Refactoring done in 19c6ad9ac7 didn't
correctly take into account the order cgroup limit modification needs to
be done in. This resulted into errors when decreasing the limits.

The operations need to take place in this order:

decrease hard limit
change swap hard limit

or

change swap hard limit
increase hard limit

This patch also fixes the check if the hard_limit is less than
swap_hard_limit to print better error messages. For this purpose I
introduced a helper function virCompareLimitUlong to compare limit
values where value of 0 is equal to unlimited. Additionally the check is
now applied also when the user does not provide all of the tunables
through the API and in that case the currently set values are used.

This patch resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=950478
2013-04-23 07:10:56 +02:00
..
iohelper.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
keymaps.csv
viralloc.c util: fix virAllocVar's comment 2013-03-22 13:05:46 +01:00
viralloc.h viralloc: Export virAllocTest* 2013-03-22 12:45:14 +01:00
virarch.c Add armv6l architecture to list of valid arches 2013-04-04 11:07:32 +01:00
virarch.h Add armv6l architecture to list of valid arches 2013-04-04 11:07:32 +01:00
viratomic.c
viratomic.h
viraudit.c Convert HAVE_AUDIT to WITH_AUDIT 2013-01-11 11:03:23 +00:00
viraudit.h
virauth.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virauth.h
virauthconfig.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virauthconfig.h
virbitmap.c util: Add a helper to check if all bits of a bitmap are clear 2013-04-06 10:14:21 +08:00
virbitmap.h util: Add a helper to check if all bits of a bitmap are clear 2013-04-06 10:14:21 +08:00
virbuffer.c util: Check for negative indent in virBufferAdd 2013-01-16 10:52:39 +01:00
virbuffer.h Rename buf.{c,h} to virbuffer.{c,h} 2012-12-21 11:17:12 +00:00
vircgroup.c Fix compilation error in util/vircgroup.c 2013-04-16 08:16:37 -04:00
vircgroup.h Fix build breaker with ATTRIBUTE_NONNULL defs 2013-04-16 07:17:00 -04:00
vircgrouppriv.h Track symlinks for co-mounted cgroup controllers 2013-04-15 17:35:32 +01:00
vircommand.c util: fix clear_emulator_capabilities=0 2013-03-14 14:02:32 -04:00
vircommand.h util: add security label setting to virCommand 2013-02-13 16:11:15 -05:00
virconf.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virconf.h Rename conf.{c,h} to virconf.{c,h} 2012-12-21 11:17:13 +00:00
virdbus.c Convert HAVE_DBUS to WITH_DBUS 2013-01-14 13:25:47 +00:00
virdbus.h Convert HAVE_DBUS to WITH_DBUS 2013-01-14 13:25:47 +00:00
virdnsmasq.c use client id for IPv6 DHCP host definition 2013-02-25 02:49:06 -05:00
virdnsmasq.h use client id for IPv6 DHCP host definition 2013-02-25 02:49:06 -05:00
virebtables.c Use virMacAddrFormat instead of manual mac address formatting 2013-04-02 15:53:43 +02:00
virebtables.h Rename ebtables.{c,h} to virebtables.{c,h} 2012-12-21 11:17:13 +00:00
virendian.h util: add virendian.h macros 2013-02-12 09:00:15 -07:00
virerror.c Add an API for re-mounting cgroups, to isolate the process location 2013-04-15 17:35:32 +01:00
virerror.h Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virevent.c docs: don't ignore virEvent API 2013-02-01 16:01:45 -07:00
virevent.h Rename event.{c,h} to virevent.{c,h} 2012-12-21 11:17:13 +00:00
vireventpoll.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
vireventpoll.h Rename event_poll.{c,h} to vireventpoll.{c,h} 2012-12-21 11:17:13 +00:00
virfile.c Introduce a virFileDeleteTree method 2013-04-15 17:35:31 +01:00
virfile.h Introduce a virFileDeleteTree method 2013-04-15 17:35:31 +01:00
virhash.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virhash.h
virhashcode.c
virhashcode.h
virhook.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virhook.h Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
viridentity.c Fix initialization of virIdentityPtr thread locals 2013-03-21 10:58:15 +00:00
viridentity.h Add API to get the system identity 2013-03-19 13:45:19 +00:00
virinitctl.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virinitctl.h
viriptables.c net: use newer iptables syntax 2013-03-27 16:20:03 -06:00
viriptables.h net: use structs for address and port ranges 2013-02-19 14:42:18 -05:00
virjson.c Convert HAVE_YAJL into WITH_YAJL 2013-01-11 11:03:22 +00:00
virjson.h Rename json.{c,h} to virjson.{c,h} 2012-12-21 11:17:13 +00:00
virkeycode-mapgen.py Rewrite keycode map to avoid a struct 2013-04-08 10:03:20 +01:00
virkeycode.c Rewrite keycode map to avoid a struct 2013-04-08 10:03:20 +01:00
virkeycode.h cleanup: Don't include libvirt/libvirt.h 2013-04-17 15:50:53 +08:00
virkeyfile.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virkeyfile.h
virlockspace.c util: Need to check child JSON allocation before use 2013-01-22 14:34:12 +01:00
virlockspace.h Rename json.{c,h} to virjson.{c,h} 2012-12-21 11:17:13 +00:00
virlog.c logging: Make log regexp more compact (and readable) 2013-04-22 20:13:40 +02:00
virlog.h Add method for checking if a string is (probably) a log message 2013-03-07 18:56:52 +00:00
virmacaddr.c util: Change virMacAddrFormat to lowercase hex characters 2013-04-02 15:53:43 +02:00
virmacaddr.h
virnetdev.c Avoid casts between unsigned char * and struct nlmsghdr 2013-04-08 10:03:21 +01:00
virnetdev.h Avoid casts between unsigned char * and struct nlmsghdr 2013-04-08 10:03:21 +01:00
virnetdevbandwidth.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnetdevbandwidth.h
virnetdevbridge.c Fix conditional build of virNetDevSetupControlFull 2013-03-07 18:08:33 +00:00
virnetdevbridge.h
virnetdevmacvlan.c Avoid casts between unsigned char * and struct nlmsghdr 2013-04-08 10:03:21 +01:00
virnetdevmacvlan.h
virnetdevopenvswitch.c util: Need to add virCommandFree() 2013-01-24 12:37:30 +01:00
virnetdevopenvswitch.h Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
virnetdevtap.c cleanup: Remove the duplicate header 2013-04-17 15:49:35 +08:00
virnetdevtap.h
virnetdevveth.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnetdevveth.h
virnetdevvlan.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnetdevvlan.h
virnetdevvportprofile.c Avoid casts between unsigned char * and struct nlmsghdr 2013-04-08 10:03:21 +01:00
virnetdevvportprofile.h Rename uuid.{c,h} to viruuid.{c,h} 2012-12-21 11:19:49 +00:00
virnetlink.c Fix signature of dummy virNetlinkCommand stub 2013-04-15 17:35:30 +01:00
virnetlink.h Avoid casts between unsigned char * and struct nlmsghdr 2013-04-08 10:03:21 +01:00
virnodesuspend.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnodesuspend.h
virnuma.c NUMA: cleanup for numa related codes 2013-03-20 19:37:00 +08:00
virnuma.h NUMA: cleanup for numa related codes 2013-03-20 19:37:00 +08:00
virobject.c Use VIR_ALLOC_VAR instead of VIR_ALLOC_N for creating virObject 2013-04-08 10:03:21 +01:00
virobject.h build: allow virObject to have no parent 2013-01-22 13:45:38 -07:00
virpci.c docs: fix usage of 'onto' 2013-04-19 14:31:16 -06:00
virpci.h Use unsigned int instead of unsigned 2013-04-15 23:07:08 +08:00
virpidfile.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virpidfile.h
virportallocator.c build: fix build on BSD 2013-01-17 16:39:10 -07:00
virportallocator.h Add a port allocator class 2013-01-16 11:02:58 +00:00
virprocess.c Add internal APIs for dealing with namespaces 2013-01-08 09:21:08 +00:00
virprocess.h Add internal APIs for dealing with namespaces 2013-01-08 09:21:08 +00:00
virrandom.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virrandom.h
virsexpr.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virsexpr.h Rename sexpr.{c,h} to virsexpr.{c,h} 2012-12-21 11:19:48 +00:00
virsocketaddr.c create virSocketAddrGetIpPrefix utility function 2013-04-22 14:10:53 -04:00
virsocketaddr.h create virSocketAddrGetIpPrefix utility function 2013-04-22 14:10:53 -04:00
virstatslinux.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virstatslinux.h Rename stats_linux.{c,h} to virstatslinux.{c,h} 2012-12-21 11:19:48 +00:00
virstoragefile.c Fix size probing for VDI images 2013-03-14 15:12:06 +01:00
virstoragefile.h storage: don't follow backing chain symlinks too eagerly 2013-02-15 16:07:01 -07:00
virstring.c Add function to find a needle in a string array 2013-04-12 16:55:45 -04:00
virstring.h Add function to find a needle in a string array 2013-04-12 16:55:45 -04:00
virsysinfo.c Implement minimal sysinfo for ARM platforms 2013-04-04 11:07:31 +01:00
virsysinfo.h Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
virthread.c Rename threads.{c,h} to virthread.{c,h} 2012-12-21 11:19:49 +00:00
virthread.h Add API for thread cancellation 2013-03-12 18:07:11 +00:00
virthreadpool.c virCondDestroy: Lose attribute RETURN_CHECK 2013-02-08 09:12:11 +01:00
virthreadpool.h Rename threadpool.{c,h} to virthreadpool.{c,h} 2012-12-21 11:19:48 +00:00
virthreadpthread.c Add API for thread cancellation 2013-03-12 18:07:11 +00:00
virthreadpthread.h Rename threads.{c,h} to virthread.{c,h} 2012-12-21 11:19:49 +00:00
virthreadwin32.c Add empty stub for virThreadCancel on Win32 2013-04-15 17:35:30 +01:00
virthreadwin32.h Rename threads.{c,h} to virthread.{c,h} 2012-12-21 11:19:49 +00:00
virtime.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virtime.h
virtpm.c Helper functions for host TPM support 2013-04-12 16:55:45 -04:00
virtpm.h Helper functions for host TPM support 2013-04-12 16:55:45 -04:00
virtypedparam.c Avoid resetting errors in virTypedParamsFree 2013-02-19 10:52:37 +01:00
virtypedparam.h Introduce virTypedParamsClear public API 2013-01-18 15:04:00 +01:00
viruri.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
viruri.h
virusb.c Use unsigned int instead of unsigned 2013-04-15 23:07:08 +08:00
virusb.h Convert virPCIDeviceList and virUSBDeviceList into virObjectLockable 2013-02-05 19:22:26 +00:00
virutil.c qemu: Fix setting of memory tunables 2013-04-23 07:10:56 +02:00
virutil.h qemu: Fix setting of memory tunables 2013-04-23 07:10:56 +02:00
viruuid.c Generate RFC4122 compliant UUIDs 2013-04-08 13:18:07 -06:00
viruuid.h Rename uuid.{c,h} to viruuid.{c,h} 2012-12-21 11:19:49 +00:00
virxml.c util: Add docs for virXMLProp string 2013-02-27 11:49:03 +01:00
virxml.h Rename xml.{c,h} to virxml.{c,h} 2012-12-21 11:19:50 +00:00