- 01 8月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Make the virCgroupNewMachine method try to use systemd-machined first. If that fails, then fallback to using the traditional cgroup setup code path. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Systemd uses a named cgroup mount for tracking processes. Add it as another type of controller, albeit one which we have to special case in a number of places. In particular we must never create/delete directories there, nor add tasks. Essentially the systemd mount is to be considered read-only for libvirt. With this change both the virCgroupDetectPlacement and virCgroupCopyPlacement methods must be invoked. The copy placement method will copy setup for resource controllers only. The detect placement method will probe for any named controllers, or resource controllers not already setup. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 26 7月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
When detecting cgroups we must honour any controllers whitelist the driver may have. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virCgroupIsValidMachine does not need to be called from outside the cgroups file now, so make it static. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Instead of requiring drivers to use a combination of calls to virCgroupNewDetect and virCgroupIsValidMachine, combine the two into virCgroupNewDetectMachine Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 25 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Instead of requiring one API call to create a cgroup and another to add a task to it, introduce a new API virCgroupNewMachine which does both jobs at once. This will facilitate the later code to talk to systemd to achieve this job which is also atomic. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 24 7月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
The virCgroupNewDomainDriver and virCgroupNewDriver methods are obsolete now that we can auto-detect existing cgroup placement. Delete them to reduce code bloat. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Add virCgroupIsValidMachine API to check whether an auto detected cgroup is valid for a machine. This lets us check if a VM has just been placed into some generic shared cgroup, or worse, the root cgroup Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Add a virCgroupNewDetect API which is used to initialize a cgroup object with the placement of an arbitrary process. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 22 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Instead of returning raw errno values, report full libvirt errors in virCgroupNew* functions. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 16 4月, 2013 6 次提交
-
-
由 John Ferlan 提交于
Using "./autogen.sh --system lv_cv_static_analysis=yes" for my daily Coverity builds resulted in the following error when building: In file included from util/vircgrouppriv.h:32:0, from util/vircgroup.c:44: util/vircgroup.h:59:5: error: nonnull argument with out-of-range operand number (argument 1, operand 5) util/vircgroup.h:74:5: error: nonnull argument references non-pointer operand (argument 1, operand 4) make[3]: *** [libvirt_util_la-vircgroup.lo] Error 1 make[3]: Leaving directory `/home/jferlan/libvirt.cov.curr/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/jferlan/libvirt.cov.curr/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/jferlan/libvirt.cov.curr' make: *** [all] Error 2
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Add a virCgroupIsolateMount method which looks at where the current process is place in the cgroups (eg /system/demo.lxc.libvirt) and then remounts the cgroups such that this sub-directory becomes the root directory from the current process' POV. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virCgroupNewDriver method had a 'bool privileged' param. If a false value was ever passed in, it would simply not work, since non-root users don't have any privileges to create new cgroups. Just delete this broken code entirely and make the QEMU driver skip cgroup setup in non-privileged mode Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
A resource partition is an absolute cgroup path, ignoring the current process placement. Expose a virCgroupNewPartition API for constructing such cgroups Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Rename all the virCgroupForXXX methods to use the form virCgroupNewXXX since they are all constructors. Also make sure the output parameter is the last one in the list, and annotate all pointers as non-null. Fix up all callers, and make sure they use true/false not 0/1 for the boolean parameters Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 08 4月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virCgroupMounted method is badly named, since a controller can be mounted, but disabled in the current object. Rename the method to be virCgroupHasController. Also make it tolerant to a NULL virCgroupPtr and out-of-range controller index, to avoid duplication of these checks in all callers Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 4月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Currently when getting an instance of virCgroupPtr we will create the path in all cgroup controllers. Only at the virt driver layer are we attempting to filter controllers. This is bad because the mere act of creating the dirs in the controllers can have a functional impact on the kernel, particularly for performance. Update the virCgroupForDriver() method to accept a bitmask of controllers to use. Only create dirs in the controllers that are requested. When creating cgroups for domains, respect the active controller list from the parent cgroup Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virCgroupGetAppRoot is not clear in its meaning. Change to virCgroupForSelf to highlight that this returns the cgroup config for the caller's process Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 3月, 2013 1 次提交
-
-
由 Gao feng 提交于
We will use virCgroupRemoveRecursively to remove cgroup directories in the coming patch. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
- 17 1月, 2013 1 次提交
-
-
由 Hu Tao 提交于
required by VIR_ENUM_DECL.
-
- 21 12月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
To bring in line with new naming practice, rename the= src/util/cgroup.{h,c} files to vircgroup.{h,c} Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 30 11月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virStateInitialize method and several cgroups methods were using an 'int privileged' parameter or similar for dual-state values. These are better represented with the bool type. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 28 11月, 2012 2 次提交
-
-
由 Gao feng 提交于
because libvirt_lxc's cgroup mountpoint is what it shown in /proc/self/cgroup. we can get container's cgroup through virCgroupNew("/", &group), add interface virCgroupGetAppRoot to help container to get it's cgroup. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
virCgroupGetMemSwapUsage is used to get container's swap usage, with this interface,we can get swap usage in fuse filesystem. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
- 21 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
https://www.gnu.org/licenses/gpl-howto.html recommends that the 'If not, see <url>.' phrase be a separate sentence. * tests/securityselinuxhelper.c: Remove doubled line. * tests/securityselinuxtest.c: Likewise. * globally: s/; If/. If/
-
- 07 9月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The introduction of /sys/fs/cgroup came in fairly recent kernels. Prior to that time distros would pick a custom directory like /cgroup or /dev/cgroup. We need to auto-detect where this is, rather than hardcoding it Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 22 8月, 2012 3 次提交
-
-
由 Hu Tao 提交于
vcpu threads pin are implemented using sched_setaffinity(), but not controlled by cgroup. This patch does the following things: 1) enable cpuset cgroup 2) reflect all the vcpu threads pin info to cgroup Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com> Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
-
由 Hu Tao 提交于
Introduce a new API to move tasks of one controller from a cgroup to another cgroup Signed-off-by: NWen Congyang <wency@cn.fujitsu.com> Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com> Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
-
由 Wen Congyang 提交于
Introduce the function virCgroupForEmulator() to create sub directory for simulator thread(include I/O thread, vhost-net thread) Signed-off-by: NWen Congyang <wency@cn.fujitsu.com> Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com> Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
-
- 27 7月, 2012 1 次提交
-
-
由 Osier Yang 提交于
This is a follow up patch of commit f9ce7dad, it modifies all the files which declare the copyright like "See COPYING.LIB for the License of this software" to use the detailed/consistent one. And deserts the outdated comments like: * libvirt-qemu.h: * Summary: qemu specific interfaces * Description: Provides the interfaces of the libvirt library to handle * qemu specific methods * * Copy: Copyright (C) 2010, 2012 Red Hat, Inc. Uses the more compact style like: * libvirt-qemu.h: Interfaces specific for QEMU/KVM driver * * Copyright (C) 2010, 2012 Red Hat, Inc.
-
- 16 5月, 2012 2 次提交
-
-
由 Eric Blake 提交于
The use of readlink() in lxc_container.c is intentional; we don't want an absolute pathname there. * src/util/cgroup.h (VIR_CGROUP_SYSFS_MOUNT): Indent properly. * cfg.mk (exclude_file_name_regexp--sc_prohibit_readlink): Add exemption.
-
由 Daniel P. Berrange 提交于
Normal practice is for cgroups controllers to be mounted at /sys/fs/cgroup. When setting up a container, /sys is mounted with a new sysfs instance, thus we must re-mount all the cgroups controllers. The complexity is that we must mount them in the same layout as the host OS. ie if 'cpu' and 'cpuacct' were mounted at the same location in the host we must preserve this in the container. Also if any controllers are co-located we must setup symlinks from the individual controller name to the co-located mount-point Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 12 3月, 2012 1 次提交
-
-
由 Eric Blake 提交于
As documented in linux.git/Documentation/cgroups/cpuacct.txt, cpuacct.stat returns user and system time in ticks (the same unit used in times(2)). It would be a bit nicer if it were like getrusage(2) and reported timeval contents, or like cpuacct.usage and in nanoseconds, but we can't be picky. * src/util/cgroup.h (virCgroupGetCpuacctStat): New function. * src/util/cgroup.c (virCgroupGetCpuacctStat): Implement it. (virCgroupGetValueStr): Allow for multi-line files. * src/libvirt_private.syms (cgroup.h): Export it.
-
- 07 3月, 2012 1 次提交
-
-
由 KAMEZAWA Hiroyuki 提交于
* For now, only "cpu_time" is supported. * cpuacct cgroup is used for providing percpu cputime information. * src/qemu/qemu.conf - take care of cpuacct cgroup. * src/qemu/qemu_conf.c - take care of cpuacct cgroup. * src/qemu/qemu_driver.c - added an interface * src/util/cgroup.c/h - added interface for getting percpu cputime Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
- 21 12月, 2011 1 次提交
-
-
由 Hu Tao 提交于
-
- 30 11月, 2011 1 次提交
-
-
由 Hu Tao 提交于
Implement setting/getting per-device blkio weights in qemu, using the cgroups blkio.weight_device tunable.
-
- 21 7月, 2011 2 次提交
-
-
由 Wen Congyang 提交于
This patch provides 4 APIs to get and set cpu.cfs_period_us and cpu.cfs_quota_us.
-
由 Wen Congyang 提交于
Introduce the function virCgroupForVcpu() to create sub directory for each vcpu.
-
- 18 3月, 2011 1 次提交
-
-
由 Nikunj A. Dadhania 提交于
* Correct the documentation for cgroup: the swap_hard_limit indicates mem+swap_hard_limit. * Change cgroup private apis to: virCgroupGet/SetMemSwapHardLimit Signed-off-by: NNikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
-