mm: compaction: remove unneeded assignment to isolate_start_pfn
[linux-2.6-microblaze.git] / mm / compaction.c
index c3e37aa..ee2ddf7 100644 (file)
 #include "internal.h"
 
 #ifdef CONFIG_COMPACTION
+/*
+ * Fragmentation score check interval for proactive compaction purposes.
+ */
+#define HPAGE_FRAG_CHECK_INTERVAL_MSEC (500)
+
 static inline void count_compact_event(enum vm_event_item item)
 {
        count_vm_event(item);
@@ -50,11 +55,6 @@ static inline void count_compact_events(enum vm_event_item item, long delta)
 #define pageblock_start_pfn(pfn)       block_start_pfn(pfn, pageblock_order)
 #define pageblock_end_pfn(pfn)         block_end_pfn(pfn, pageblock_order)
 
-/*
- * Fragmentation score check interval for proactive compaction purposes.
- */
-static const unsigned int HPAGE_FRAG_CHECK_INTERVAL_MSEC = 500;
-
 /*
  * Page order with-respect-to which proactive compaction
  * calculates external fragmentation, which is used as
@@ -317,7 +317,6 @@ __reset_isolation_pfn(struct zone *zone, unsigned long pfn, bool check_source,
                }
 
                page += (1 << PAGE_ALLOC_COSTLY_ORDER);
-               pfn += (1 << PAGE_ALLOC_COSTLY_ORDER);
        } while (page <= end_page);
 
        return false;
@@ -899,7 +898,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
                 * not falsely conclude that the block should be skipped.
                 */
                if (!valid_page && IS_ALIGNED(low_pfn, pageblock_nr_pages)) {
-                       if (!cc->ignore_skip_hint && get_pageblock_skip(page)) {
+                       if (!isolation_suitable(cc, page)) {
                                low_pfn = end_pfn;
                                page = NULL;
                                goto isolate_abort;
@@ -1587,7 +1586,7 @@ static void isolate_freepages(struct compact_control *cc)
        unsigned int stride;
 
        /* Try a small search of the free lists for a candidate */
-       isolate_start_pfn = fast_isolate_freepages(cc);
+       fast_isolate_freepages(cc);
        if (cc->nr_freepages)
                goto splitmap;
 
@@ -3016,21 +3015,18 @@ static int kcompactd(void *p)
  * This kcompactd start function will be called by init and node-hot-add.
  * On node-hot-add, kcompactd will moved to proper cpus if cpus are hot-added.
  */
-int kcompactd_run(int nid)
+void kcompactd_run(int nid)
 {
        pg_data_t *pgdat = NODE_DATA(nid);
-       int ret = 0;
 
        if (pgdat->kcompactd)
-               return 0;
+               return;
 
        pgdat->kcompactd = kthread_run(kcompactd, pgdat, "kcompactd%d", nid);
        if (IS_ERR(pgdat->kcompactd)) {
                pr_err("Failed to start kcompactd on node %d\n", nid);
-               ret = PTR_ERR(pgdat->kcompactd);
                pgdat->kcompactd = NULL;
        }
-       return ret;
 }
 
 /*