summaryrefslogtreecommitdiffstats
path: root/ipc/shm.c
diff options
context:
space:
mode:
authorZlatko Calusic2013-02-23 01:32:34 +0100
committerLinus Torvalds2013-02-24 02:50:10 +0100
commitdafcb73e385e39b9a7ebd5c4ecbc4ae921862eb9 (patch)
tree407a7710a7c4c6382bb9d415cd8de05430821600 /ipc/shm.c
parentmm: compaction: make __compact_pgdat() and compact_pgdat() return void (diff)
downloadkernel-qcow2-linux-dafcb73e385e39b9a7ebd5c4ecbc4ae921862eb9.tar.gz
kernel-qcow2-linux-dafcb73e385e39b9a7ebd5c4ecbc4ae921862eb9.tar.xz
kernel-qcow2-linux-dafcb73e385e39b9a7ebd5c4ecbc4ae921862eb9.zip
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 <zlatko.calusic@iskon.hr> Cc: Mel Gorman <mgorman@suse.de> Cc: Hugh Dickins <hughd@google.com> Cc: Minchan Kim <minchan.kim@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/shm.c')
0 files changed, 0 insertions, 0 deletions