Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232013
b: refs/heads/master
c: 82478fb
h: refs/heads/master
i:
  232011: 4650d39
v: v3
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed Jan 21, 2011
1 parent 3b79834 commit 25a2440
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 3305de51bf612603c9a4e4dc98ceb839ef933749
refs/heads/master: 82478fb7bca28e3ca2f3c55c14e690f749dd4dbb
11 changes: 11 additions & 0 deletions trunk/mm/compaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ static int compact_finished(struct zone *zone,
if (!zone_watermark_ok(zone, cc->order, watermark, 0, 0))
return COMPACT_CONTINUE;

/*
* order == -1 is expected when compacting via
* /proc/sys/vm/compact_memory
*/
if (cc->order == -1)
return COMPACT_CONTINUE;

Expand Down Expand Up @@ -453,6 +457,13 @@ unsigned long compaction_suitable(struct zone *zone, int order)
if (!zone_watermark_ok(zone, 0, watermark, 0, 0))
return COMPACT_SKIPPED;

/*
* order == -1 is expected when compacting via
* /proc/sys/vm/compact_memory
*/
if (order == -1)
return COMPACT_CONTINUE;

/*
* fragmentation index determines if allocation failures are due to
* low memory or external fragmentation
Expand Down

0 comments on commit 25a2440

Please sign in to comment.