diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-27 05:44:53 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-27 05:44:53 -0800 |
commit | cc11f372e9371ec3a3dad02396dbe0a55eec0b8f (patch) | |
tree | fd22bdac975ee61053e787ad96c912fddc485370 /include/linux/compaction.h | |
parent | 5b4af8b6397c2da6e3c05893d974b6559441901d (diff) | |
parent | 77d143de75812596a58d126606f42d1214e09dde (diff) | |
download | linux-stable-cc11f372e9371ec3a3dad02396dbe0a55eec0b8f.tar.gz linux-stable-cc11f372e9371ec3a3dad02396dbe0a55eec0b8f.tar.bz2 linux-stable-cc11f372e9371ec3a3dad02396dbe0a55eec0b8f.zip |
Merge branch 'master' into staging-next
We need the network changes in staging-next in order to be able to fix
up the rtl8821ae driver to build properly.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/compaction.h')
-rw-r--r-- | include/linux/compaction.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 091d72e70d8a..7e1c76e3cd68 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h @@ -62,6 +62,22 @@ static inline bool compaction_deferred(struct zone *zone, int order) return zone->compact_considered < defer_limit; } +/* + * Update defer tracking counters after successful compaction of given order, + * which means an allocation either succeeded (alloc_success == true) or is + * expected to succeed. + */ +static inline void compaction_defer_reset(struct zone *zone, int order, + bool alloc_success) +{ + if (alloc_success) { + zone->compact_considered = 0; + zone->compact_defer_shift = 0; + } + if (order >= zone->compact_order_failed) + zone->compact_order_failed = order + 1; +} + /* Returns true if restarting compaction after many failures */ static inline bool compaction_restarting(struct zone *zone, int order) { |