From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mel Gorman Subject: [PATCH 1/2] mm: vmscan: Correct use of pgdat_balanced in sleeping_prematurely Date: Mon, 23 May 2011 10:53:54 +0100 Message-ID: <1306144435-2516-2-git-send-email-mgorman@suse.de> References: <1306144435-2516-1-git-send-email-mgorman@suse.de> Cc: James Bottomley , Colin King , Raghavendra D Prabhu , Jan Kara , Chris Mason , Christoph Lameter , Pekka Enberg , Rik van Riel , Johannes Weiner , Minchan Kim , linux-fsdevel , linux-mm , linux-kernel , linux-ext4 , stable , Mel Gorman To: Andrew Morton Return-path: In-Reply-To: <1306144435-2516-1-git-send-email-mgorman@suse.de> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org From: Johannes Weiner Johannes Weiner poined out that the logic in commit [1741c877: mm: kswapd: keep kswapd awake for high-order allocations until a percentage of the node is balanced] is backwards. Instead of allowing kswapd to go to sleep when balancing for high order allocations, it keeps it kswapd running uselessly. Signed-off-by: Mel Gorman Reviewed-by: Rik van Riel --- mm/vmscan.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 8bfd450..1aa262b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2286,7 +2286,7 @@ static bool sleeping_prematurely(pg_data_t *pgdat, int order, long remaining, * must be balanced */ if (order) - return pgdat_balanced(pgdat, balanced, classzone_idx); + return !pgdat_balanced(pgdat, balanced, classzone_idx); else return !all_zones_ok; } -- 1.7.3.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org