Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 151547
b: refs/heads/master
c: 72807a7
h: refs/heads/master
i:
  151545: e9331c2
  151543: fde6b1d
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Jun 17, 2009
1 parent 580ff21 commit 659b4fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 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: 092cead6175bb1b3d3078a34ba71c939d526c70b
refs/heads/master: 72807a74c0172376bba6b5b27702c9f702b526e9
12 changes: 9 additions & 3 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1446,9 +1446,6 @@ get_page_from_freelist(gfp_t gfp_mask, nodemask_t *nodemask, unsigned int order,
int zlc_active = 0; /* set if using zonelist_cache */
int did_zlc_setup = 0; /* just call zlc_setup() one time */

if (WARN_ON_ONCE(order >= MAX_ORDER))
return NULL;

classzone_idx = zone_idx(preferred_zone);
zonelist_scan:
/*
Expand Down Expand Up @@ -1706,6 +1703,15 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
unsigned long did_some_progress;
struct task_struct *p = current;

/*
* In the slowpath, we sanity check order to avoid ever trying to
* reclaim >= MAX_ORDER areas which will never succeed. Callers may
* be using allocators in order of preference for an area that is
* too large.
*/
if (WARN_ON_ONCE(order >= MAX_ORDER))
return NULL;

/*
* GFP_THISNODE (meaning __GFP_THISNODE, __GFP_NORETRY and
* __GFP_NOWARN set) should not cause reclaim since the subsystem
Expand Down

0 comments on commit 659b4fc

Please sign in to comment.