net: icmp: rename ICMPMSGIN_INC_STATS_BH()
[deliverable/linux.git] / mm / compaction.c
index 5b2bfbaa821a35d02ad4ae86c081abe07154acd8..ccf97b02b85f32d38f6f68a41bedf89b9a1ee596 100644 (file)
@@ -1191,11 +1191,11 @@ static int __compact_finished(struct zone *zone, struct compact_control *cc,
 
                /*
                 * Mark that the PG_migrate_skip information should be cleared
-                * by kswapd when it goes to sleep. kswapd does not set the
+                * by kswapd when it goes to sleep. kcompactd does not set the
                 * flag itself as the decision to be clear should be directly
                 * based on an allocation request.
                 */
-               if (!current_is_kswapd())
+               if (cc->direct_compaction)
                        zone->compact_blockskip_flush = true;
 
                return COMPACT_COMPLETE;
@@ -1338,10 +1338,9 @@ static int compact_zone(struct zone *zone, struct compact_control *cc)
 
        /*
         * Clear pageblock skip if there were failures recently and compaction
-        * is about to be retried after being deferred. kswapd does not do
-        * this reset as it'll reset the cached information when going to sleep.
+        * is about to be retried after being deferred.
         */
-       if (compaction_restarting(zone, cc->order) && !current_is_kswapd())
+       if (compaction_restarting(zone, cc->order))
                __reset_isolation_suitable(zone);
 
        /*
@@ -1477,6 +1476,7 @@ static unsigned long compact_zone_order(struct zone *zone, int order,
                .mode = mode,
                .alloc_flags = alloc_flags,
                .classzone_idx = classzone_idx,
+               .direct_compaction = true,
        };
        INIT_LIST_HEAD(&cc.freepages);
        INIT_LIST_HEAD(&cc.migratepages);
This page took 0.029277 seconds and 5 git commands to generate.