From: Zlatko Calusic Date: Sat, 23 Feb 2013 00:32:34 +0000 (-0800) Subject: mm: avoid calling pgdat_balanced() needlessly X-Git-Tag: v3.9-rc1~99^2~133 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dafcb73e385e39b9a7ebd5c4ecbc4ae921862eb9;p=pandora-kernel.git mm: avoid calling pgdat_balanced() needlessly Now that balance_pgdat() is slightly tidied up, thanks to more capable pgdat_balanced(), it's become obvious that pgdat_balanced() is called to check the status, then break the loop if pgdat is balanced, just to be immediately called again. The second call is completely unnecessary, of course. The patch introduces pgdat_is_balanced boolean, which helps resolve the above suboptimal behavior, with the added benefit of slightly better documenting one other place in the function where we jump and skip lots of code. Signed-off-by: Zlatko Calusic Cc: Mel Gorman Cc: Hugh Dickins Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed