2012-07-13 11:21:27 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2010-2012 Red Hat, Inc.
|
|
|
|
* Copyright IBM Corp. 2008
|
|
|
|
*
|
|
|
|
* lxc_cgroup.c: LXC cgroup helpers
|
|
|
|
*
|
|
|
|
* 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/>.
|
2012-07-13 11:21:27 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VIR_LXC_CGROUP_H__
|
|
|
|
# define __VIR_LXC_CGROUP_H__
|
|
|
|
|
2013-03-21 14:40:29 +00:00
|
|
|
# include "vircgroup.h"
|
2012-07-13 11:21:27 +00:00
|
|
|
# include "domain_conf.h"
|
make /proc/meminfo isolate with host through fuse
with this patch,container's meminfo will be shown based on
containers' mem cgroup.
Right now,it's impossible to virtualize all values in meminfo,
I collect some values such as MemTotal,MemFree,Cached,Active,
Inactive,Active(anon),Inactive(anon),Active(file),Inactive(anon),
Active(file),Inactive(file),Unevictable,SwapTotal,SwapFree.
if I miss something, please let me know.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
2012-11-12 11:52:01 +00:00
|
|
|
# include "lxc_fuse.h"
|
2012-12-12 17:04:51 +00:00
|
|
|
# include "virusb.h"
|
2012-07-13 11:21:27 +00:00
|
|
|
|
2013-07-22 12:59:28 +00:00
|
|
|
virCgroupPtr virLXCCgroupCreate(virDomainDefPtr def);
|
2013-03-21 14:40:29 +00:00
|
|
|
virCgroupPtr virLXCCgroupJoin(virDomainDefPtr def);
|
2013-03-14 12:47:28 +00:00
|
|
|
int virLXCCgroupSetup(virDomainDefPtr def,
|
2013-03-20 03:35:09 +00:00
|
|
|
virCgroupPtr cgroup,
|
|
|
|
virBitmapPtr nodemask);
|
|
|
|
|
make /proc/meminfo isolate with host through fuse
with this patch,container's meminfo will be shown based on
containers' mem cgroup.
Right now,it's impossible to virtualize all values in meminfo,
I collect some values such as MemTotal,MemFree,Cached,Active,
Inactive,Active(anon),Inactive(anon),Active(file),Inactive(anon),
Active(file),Inactive(file),Unevictable,SwapTotal,SwapFree.
if I miss something, please let me know.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
2012-11-12 11:52:01 +00:00
|
|
|
int virLXCCgroupGetMeminfo(virLXCMeminfoPtr meminfo);
|
2012-11-23 14:46:18 +00:00
|
|
|
|
|
|
|
int
|
2014-03-13 11:58:17 +00:00
|
|
|
virLXCSetupHostUSBDeviceCgroup(virUSBDevicePtr dev,
|
2012-11-23 14:46:18 +00:00
|
|
|
const char *path,
|
|
|
|
void *opaque);
|
|
|
|
|
|
|
|
int
|
2014-03-13 11:58:17 +00:00
|
|
|
virLXCTeardownHostUSBDeviceCgroup(virUSBDevicePtr dev,
|
2012-11-23 14:46:18 +00:00
|
|
|
const char *path,
|
|
|
|
void *opaque);
|
|
|
|
|
2012-07-13 11:21:27 +00:00
|
|
|
#endif /* __VIR_LXC_CGROUP_H__ */
|