diff options
Diffstat (limited to 'include/linux/hugetlb_cgroup.h')
-rw-r--r-- | include/linux/hugetlb_cgroup.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/hugetlb_cgroup.h b/include/linux/hugetlb_cgroup.h index e5451a3b4ebc..7d3fde996be3 100644 --- a/include/linux/hugetlb_cgroup.h +++ b/include/linux/hugetlb_cgroup.h | |||
@@ -53,6 +53,16 @@ static inline bool hugetlb_cgroup_disabled(void) | |||
53 | return false; | 53 | return false; |
54 | } | 54 | } |
55 | 55 | ||
56 | extern int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, | ||
57 | struct hugetlb_cgroup **ptr); | ||
58 | extern void hugetlb_cgroup_commit_charge(int idx, unsigned long nr_pages, | ||
59 | struct hugetlb_cgroup *h_cg, | ||
60 | struct page *page); | ||
61 | extern void hugetlb_cgroup_uncharge_page(int idx, unsigned long nr_pages, | ||
62 | struct page *page); | ||
63 | extern void hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages, | ||
64 | struct hugetlb_cgroup *h_cg); | ||
65 | |||
56 | #else | 66 | #else |
57 | static inline struct hugetlb_cgroup *hugetlb_cgroup_from_page(struct page *page) | 67 | static inline struct hugetlb_cgroup *hugetlb_cgroup_from_page(struct page *page) |
58 | { | 68 | { |
@@ -70,5 +80,33 @@ static inline bool hugetlb_cgroup_disabled(void) | |||
70 | return true; | 80 | return true; |
71 | } | 81 | } |
72 | 82 | ||
83 | static inline int | ||
84 | hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, | ||
85 | struct hugetlb_cgroup **ptr) | ||
86 | { | ||
87 | return 0; | ||
88 | } | ||
89 | |||
90 | static inline void | ||
91 | hugetlb_cgroup_commit_charge(int idx, unsigned long nr_pages, | ||
92 | struct hugetlb_cgroup *h_cg, | ||
93 | struct page *page) | ||
94 | { | ||
95 | return; | ||
96 | } | ||
97 | |||
98 | static inline void | ||
99 | hugetlb_cgroup_uncharge_page(int idx, unsigned long nr_pages, struct page *page) | ||
100 | { | ||
101 | return; | ||
102 | } | ||
103 | |||
104 | static inline void | ||
105 | hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages, | ||
106 | struct hugetlb_cgroup *h_cg) | ||
107 | { | ||
108 | return; | ||
109 | } | ||
110 | |||
73 | #endif /* CONFIG_MEM_RES_CTLR_HUGETLB */ | 111 | #endif /* CONFIG_MEM_RES_CTLR_HUGETLB */ |
74 | #endif | 112 | #endif |