From e9c084011af78196404ea003fa01d5eb7e1242a0 Mon Sep 17 00:00:00 2001 From: Minchan Kim Date: Thu, 9 Sep 2010 16:38:00 -0700 Subject: [PATCH] --- yaml --- r: 210463 b: refs/heads/master c: bc6930457460788e14b2c0808ed4632a1592bd61 h: refs/heads/master i: 210461: 668f574f76e4d7bae84da8f176ba649956d8f51c 210459: ff3f940a8a846c43ba8a9092cca545f94cfba440 210455: 0ffaf68f11a0972cb2af2553f0f74c69d62a3ab6 210447: 0509e5724fe69478fb82d4d9a0cc54744356fc47 210431: 45cf26c7e63351cc7e6022d4b8bfd9a293f3eb88 v: v3 --- [refs] | 2 +- trunk/mm/compaction.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 673550a2241c..35eb73d52f46 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1c24de60e50fb19b94d94225458da17c720f0729 +refs/heads/master: bc6930457460788e14b2c0808ed4632a1592bd61 diff --git a/trunk/mm/compaction.c b/trunk/mm/compaction.c index 94cce51b0b35..4d709ee59013 100644 --- a/trunk/mm/compaction.c +++ b/trunk/mm/compaction.c @@ -214,15 +214,16 @@ static void acct_isolated(struct zone *zone, struct compact_control *cc) /* Similar to reclaim, but different enough that they don't share logic */ static bool too_many_isolated(struct zone *zone) { - - unsigned long inactive, isolated; + unsigned long active, inactive, isolated; inactive = zone_page_state(zone, NR_INACTIVE_FILE) + zone_page_state(zone, NR_INACTIVE_ANON); + active = zone_page_state(zone, NR_ACTIVE_FILE) + + zone_page_state(zone, NR_ACTIVE_ANON); isolated = zone_page_state(zone, NR_ISOLATED_FILE) + zone_page_state(zone, NR_ISOLATED_ANON); - return isolated > inactive; + return isolated > (inactive + active) / 2; } /*