2010-12-16 16:10:54 +00:00
|
|
|
/*
|
|
|
|
* qemu_cgroup.h: QEMU cgroup management
|
|
|
|
*
|
2014-07-08 07:59:49 +00:00
|
|
|
* Copyright (C) 2006-2007, 2009-2014 Red Hat, Inc.
|
2010-12-16 16:10:54 +00:00
|
|
|
* Copyright (C) 2006 Daniel P. Berrange
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-09-20 22:30:55 +00:00
|
|
|
* License along with this library. If not, see
|
2012-07-21 10:06:23 +00:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
2010-12-16 16:10:54 +00:00
|
|
|
*
|
|
|
|
* Author: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __QEMU_CGROUP_H__
|
|
|
|
# define __QEMU_CGROUP_H__
|
|
|
|
|
2012-12-12 17:04:51 +00:00
|
|
|
# include "virusb.h"
|
2013-03-21 14:40:29 +00:00
|
|
|
# include "vircgroup.h"
|
2010-12-16 16:10:54 +00:00
|
|
|
# include "domain_conf.h"
|
|
|
|
# include "qemu_conf.h"
|
|
|
|
|
2016-02-15 15:15:58 +00:00
|
|
|
int qemuSetupImageCgroup(virDomainObjPtr vm,
|
|
|
|
virStorageSourcePtr src);
|
|
|
|
int qemuTeardownImageCgroup(virDomainObjPtr vm,
|
|
|
|
virStorageSourcePtr src);
|
2012-10-17 20:22:24 +00:00
|
|
|
int qemuSetupDiskCgroup(virDomainObjPtr vm,
|
2010-12-16 16:10:54 +00:00
|
|
|
virDomainDiskDefPtr disk);
|
2012-10-17 20:22:24 +00:00
|
|
|
int qemuTeardownDiskCgroup(virDomainObjPtr vm,
|
2010-12-16 16:10:54 +00:00
|
|
|
virDomainDiskDefPtr disk);
|
2015-11-19 13:35:46 +00:00
|
|
|
int qemuSetupHostdevCgroup(virDomainObjPtr vm,
|
2013-04-29 17:15:26 +00:00
|
|
|
virDomainHostdevDefPtr dev)
|
|
|
|
ATTRIBUTE_RETURN_CHECK;
|
|
|
|
int qemuTeardownHostdevCgroup(virDomainObjPtr vm,
|
|
|
|
virDomainHostdevDefPtr dev)
|
|
|
|
ATTRIBUTE_RETURN_CHECK;
|
2013-07-22 12:59:28 +00:00
|
|
|
int qemuConnectCgroup(virQEMUDriverPtr driver,
|
|
|
|
virDomainObjPtr vm);
|
2012-11-28 16:43:10 +00:00
|
|
|
int qemuSetupCgroup(virQEMUDriverPtr driver,
|
2015-01-16 11:25:50 +00:00
|
|
|
virDomainObjPtr vm,
|
|
|
|
size_t nnicindexes,
|
|
|
|
int *nicindexes);
|
2014-12-12 14:23:12 +00:00
|
|
|
int qemuSetupCpusetMems(virDomainObjPtr vm);
|
2011-07-21 02:10:31 +00:00
|
|
|
int qemuSetupCgroupVcpuBW(virCgroupPtr cgroup,
|
|
|
|
unsigned long long period,
|
|
|
|
long long quota);
|
2015-03-27 12:28:59 +00:00
|
|
|
int qemuSetupCgroupCpusetCpus(virCgroupPtr cgroup, virBitmapPtr cpumask);
|
2016-02-01 15:50:54 +00:00
|
|
|
int qemuRemoveCgroup(virDomainObjPtr vm);
|
2010-12-16 16:10:54 +00:00
|
|
|
|
|
|
|
#endif /* __QEMU_CGROUP_H__ */
|