Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232732
b: refs/heads/master
c: 9221edb
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed Feb 3, 2011
1 parent 4a77ccf commit bef3444
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: af241a083404acda7ba3690e5b7697949d729fcc
refs/heads/master: 9221edb7120e2dc3ae90f1c58514979f7ba40e46
11 changes: 9 additions & 2 deletions trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1837,8 +1837,15 @@ static int __mem_cgroup_do_charge(struct mem_cgroup *mem, gfp_t gfp_mask,
flags |= MEM_CGROUP_RECLAIM_NOSWAP;
} else
mem_over_limit = mem_cgroup_from_res_counter(fail_res, res);

if (csize > PAGE_SIZE) /* change csize and retry */
/*
* csize can be either a huge page (HPAGE_SIZE), a batch of
* regular pages (CHARGE_SIZE), or a single regular page
* (PAGE_SIZE).
*
* Never reclaim on behalf of optional batching, retry with a
* single page instead.
*/
if (csize == CHARGE_SIZE)
return CHARGE_RETRY;

if (!(gfp_mask & __GFP_WAIT))
Expand Down

0 comments on commit bef3444

Please sign in to comment.