Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376976
b: refs/heads/master
c: 026b081
h: refs/heads/master
v: v3
  • Loading branch information
Tomasz Stanislawski authored and Linus Torvalds committed Jun 12, 2013
1 parent d8de91b commit 5203716
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 282c4c0ecce9b9ac1b69acae32a4239441601405
refs/heads/master: 026b08147923142e925a7d0aaa39038055ae0156
6 changes: 4 additions & 2 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1628,6 +1628,7 @@ static bool __zone_watermark_ok(struct zone *z, int order, unsigned long mark,
long min = mark;
long lowmem_reserve = z->lowmem_reserve[classzone_idx];
int o;
long free_cma = 0;

free_pages -= (1 << order) - 1;
if (alloc_flags & ALLOC_HIGH)
Expand All @@ -1637,9 +1638,10 @@ static bool __zone_watermark_ok(struct zone *z, int order, unsigned long mark,
#ifdef CONFIG_CMA
/* If allocation can't use CMA areas don't use free CMA pages */
if (!(alloc_flags & ALLOC_CMA))
free_pages -= zone_page_state(z, NR_FREE_CMA_PAGES);
free_cma = zone_page_state(z, NR_FREE_CMA_PAGES);
#endif
if (free_pages <= min + lowmem_reserve)

if (free_pages - free_cma <= min + lowmem_reserve)
return false;
for (o = 0; o < order; o++) {
/* At the next order, this order's pages become unavailable */
Expand Down

0 comments on commit 5203716

Please sign in to comment.