]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: compaction: encapsulate defer reset logic
authorVlastimil Babka <vbabka@suse.cz>
Fri, 3 Jan 2014 03:09:59 +0000 (14:09 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 3 Jan 2014 03:09:59 +0000 (14:09 +1100)
commit73a423524088b08727bf2a6568ba0613a052e189
tree1e9174759d11a8df076ca605b69f8eefcfa692f3
parent3536537cf5e7ef5f186d05d1bb039d542de13fca
mm: compaction: encapsulate defer reset logic

Currently there are several functions to manipulate the deferred
compaction state variables.  The remaining case where the variables are
touched directly is when a successful allocation occurs in direct
compaction, or is expected to be successful in the future by kswapd.
Here, the lowest order that is expected to fail is updated, and in the
case of successful allocation, the deferred status and counter is reset
completely.

Create a new function compaction_defer_reset() to encapsulate this
functionality and make it easier to understand the code.  No functional
change.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/compaction.h
mm/compaction.c
mm/page_alloc.c