Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88152
b: refs/heads/master
c: 4077960
h: refs/heads/master
v: v3
  • Loading branch information
Balbir Singh authored and Linus Torvalds committed Apr 4, 2008
1 parent 0c1d3ab commit b1ad088
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8bab8dded67d026c39367bbd5e27d2f6c556c38e
refs/heads/master: 4077960e2a38ec59096ff993cd080056e17f3707
17 changes: 17 additions & 0 deletions trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,9 @@ static int mem_cgroup_charge_common(struct page *page, struct mm_struct *mm,
unsigned long nr_retries = MEM_CGROUP_RECLAIM_RETRIES;
struct mem_cgroup_per_zone *mz;

if (mem_cgroup_subsys.disabled)
return 0;

/*
* Should page_cgroup's go to their own slab?
* One could optimize the performance of the charging routine
Expand Down Expand Up @@ -665,6 +668,9 @@ void mem_cgroup_uncharge_page(struct page *page)
struct mem_cgroup_per_zone *mz;
unsigned long flags;

if (mem_cgroup_subsys.disabled)
return;

/*
* Check if our page_cgroup is valid
*/
Expand Down Expand Up @@ -705,6 +711,9 @@ int mem_cgroup_prepare_migration(struct page *page)
{
struct page_cgroup *pc;

if (mem_cgroup_subsys.disabled)
return 0;

lock_page_cgroup(page);
pc = page_get_page_cgroup(page);
if (pc)
Expand Down Expand Up @@ -803,6 +812,9 @@ static int mem_cgroup_force_empty(struct mem_cgroup *mem)
int ret = -EBUSY;
int node, zid;

if (mem_cgroup_subsys.disabled)
return 0;

css_get(&mem->css);
/*
* page reclaim code (kswapd etc..) will move pages between
Expand Down Expand Up @@ -1053,6 +1065,8 @@ static void mem_cgroup_destroy(struct cgroup_subsys *ss,
static int mem_cgroup_populate(struct cgroup_subsys *ss,
struct cgroup *cont)
{
if (mem_cgroup_subsys.disabled)
return 0;
return cgroup_add_files(cont, ss, mem_cgroup_files,
ARRAY_SIZE(mem_cgroup_files));
}
Expand All @@ -1065,6 +1079,9 @@ static void mem_cgroup_move_task(struct cgroup_subsys *ss,
struct mm_struct *mm;
struct mem_cgroup *mem, *old_mem;

if (mem_cgroup_subsys.disabled)
return;

mm = get_task_mm(p);
if (mm == NULL)
return;
Expand Down

0 comments on commit b1ad088

Please sign in to comment.