Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
hugetlb_cgroup.c File Reference
#include <linux/cgroup.h>
#include <linux/slab.h>
#include <linux/hugetlb.h>
#include <linux/hugetlb_cgroup.h>

Go to the source code of this file.

Data Structures

struct  hugetlb_cgroup
 

Macros

#define MEMFILE_PRIVATE(x, val)   (((x) << 16) | (val))
 
#define MEMFILE_IDX(val)   (((val) >> 16) & 0xffff)
 
#define MEMFILE_ATTR(val)   ((val) & 0xffff)
 

Functions

int hugetlb_cgroup_charge_cgroup (int idx, unsigned long nr_pages, struct hugetlb_cgroup **ptr)
 
void hugetlb_cgroup_commit_charge (int idx, unsigned long nr_pages, struct hugetlb_cgroup *h_cg, struct page *page)
 
void hugetlb_cgroup_uncharge_page (int idx, unsigned long nr_pages, struct page *page)
 
void hugetlb_cgroup_uncharge_cgroup (int idx, unsigned long nr_pages, struct hugetlb_cgroup *h_cg)
 
int __init hugetlb_cgroup_file_init (int idx)
 
void hugetlb_cgroup_migrate (struct page *oldhpage, struct page *newhpage)
 

Variables

struct cgroup_subsys hugetlb_subsys __read_mostly
 
struct cgroup_subsys hugetlb_subsys
 

Macro Definition Documentation

#define MEMFILE_ATTR (   val)    ((val) & 0xffff)

Definition at line 31 of file hugetlb_cgroup.c.

#define MEMFILE_IDX (   val)    (((val) >> 16) & 0xffff)

Definition at line 30 of file hugetlb_cgroup.c.

#define MEMFILE_PRIVATE (   x,
  val 
)    (((x) << 16) | (val))

Definition at line 29 of file hugetlb_cgroup.c.

Function Documentation

int hugetlb_cgroup_charge_cgroup ( int  idx,
unsigned long  nr_pages,
struct hugetlb_cgroup **  ptr 
)

Definition at line 184 of file hugetlb_cgroup.c.

void hugetlb_cgroup_commit_charge ( int  idx,
unsigned long  nr_pages,
struct hugetlb_cgroup h_cg,
struct page page 
)

Definition at line 217 of file hugetlb_cgroup.c.

int __init hugetlb_cgroup_file_init ( int  idx)

Definition at line 343 of file hugetlb_cgroup.c.

void hugetlb_cgroup_migrate ( struct page oldhpage,
struct page newhpage 
)

Definition at line 392 of file hugetlb_cgroup.c.

void hugetlb_cgroup_uncharge_cgroup ( int  idx,
unsigned long  nr_pages,
struct hugetlb_cgroup h_cg 
)

Definition at line 248 of file hugetlb_cgroup.c.

void hugetlb_cgroup_uncharge_page ( int  idx,
unsigned long  nr_pages,
struct page page 
)

Definition at line 231 of file hugetlb_cgroup.c.

Variable Documentation

struct hugetlb_cgroup* root_h_cgroup __read_mostly

Definition at line 33 of file hugetlb_cgroup.c.

struct cgroup_subsys hugetlb_subsys
Initial value:
= {
.name = "hugetlb",
.create = hugetlb_cgroup_create,
.pre_destroy = hugetlb_cgroup_pre_destroy,
.destroy = hugetlb_cgroup_destroy,
.subsys_id = hugetlb_subsys_id,
}

Definition at line 412 of file hugetlb_cgroup.c.