Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232734
b: refs/heads/master
c: 8493ae4
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed Feb 3, 2011
1 parent 13bd9f2 commit f77d1d0
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 19942822df65ee4a47c2e6d6d70cace1b7f01710
refs/heads/master: 8493ae439f7038b502df1d687e61dde54c27ca92
10 changes: 8 additions & 2 deletions trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2351,13 +2351,19 @@ static int mem_cgroup_charge_common(struct page *page, struct mm_struct *mm,
gfp_t gfp_mask, enum charge_type ctype)
{
struct mem_cgroup *mem = NULL;
int page_size = PAGE_SIZE;
struct page_cgroup *pc;
bool oom = true;
int ret;
int page_size = PAGE_SIZE;

if (PageTransHuge(page)) {
page_size <<= compound_order(page);
VM_BUG_ON(!PageTransHuge(page));
/*
* Never OOM-kill a process for a huge page. The
* fault handler will fall back to regular pages.
*/
oom = false;
}

pc = lookup_page_cgroup(page);
Expand All @@ -2366,7 +2372,7 @@ static int mem_cgroup_charge_common(struct page *page, struct mm_struct *mm,
return 0;
prefetchw(pc);

ret = __mem_cgroup_try_charge(mm, gfp_mask, &mem, true, page_size);
ret = __mem_cgroup_try_charge(mm, gfp_mask, &mem, oom, page_size);
if (ret || !mem)
return ret;

Expand Down

0 comments on commit f77d1d0

Please sign in to comment.