]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - include/linux/hugetlb_cgroup.h
mm/hugetlb: add new HugeTLB cgroup
[mirror_ubuntu-zesty-kernel.git] / include / linux / hugetlb_cgroup.h
CommitLineData
2bc64a20
AK
1/*
2 * Copyright IBM Corporation, 2012
3 * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2.1 of the GNU Lesser General Public License
7 * as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it would be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 *
13 */
14
15#ifndef _LINUX_HUGETLB_CGROUP_H
16#define _LINUX_HUGETLB_CGROUP_H
17
18#include <linux/res_counter.h>
19
20struct hugetlb_cgroup;
21
22#ifdef CONFIG_CGROUP_HUGETLB
23static inline bool hugetlb_cgroup_disabled(void)
24{
25 if (hugetlb_subsys.disabled)
26 return true;
27 return false;
28}
29
30#else
31static inline bool hugetlb_cgroup_disabled(void)
32{
33 return true;
34}
35
36#endif /* CONFIG_MEM_RES_CTLR_HUGETLB */
37#endif