mm: compaction: direct compact when a high-order allocation fails
[safe/jmp/linux-2.6] / mm / vmscan.c
index 3ff3311..25b0202 100644 (file)
@@ -839,11 +839,6 @@ keep:
        return nr_reclaimed;
 }
 
-/* LRU Isolation modes. */
-#define ISOLATE_INACTIVE 0     /* Isolate inactive pages. */
-#define ISOLATE_ACTIVE 1       /* Isolate active pages. */
-#define ISOLATE_BOTH 2         /* Isolate both active and inactive pages. */
-
 /*
  * Attempt to remove the specified page from its LRU.  Only take this page
  * if it is of the appropriate PageActive status.  Pages which are being
@@ -1774,6 +1769,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
        enum zone_type high_zoneidx = gfp_zone(sc->gfp_mask);
        unsigned long writeback_threshold;
 
+       get_mems_allowed();
        delayacct_freepages_start();
 
        if (scanning_global_lru(sc))
@@ -1857,6 +1853,7 @@ out:
                mem_cgroup_record_reclaim_priority(sc->mem_cgroup, priority);
 
        delayacct_freepages_end();
+       put_mems_allowed();
 
        return ret;
 }