Skip to content
  • Zlatko Calusic's avatar
    mm: avoid calling pgdat_balanced() needlessly · dafcb73e
    Zlatko Calusic authored
    
    
    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: default avatarZlatko 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: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    dafcb73e