block: add QUEUE_FLAG_NOWAIT
[linux-2.6-microblaze.git] / mm / internal.h
index 9886db2..10c6776 100644 (file)
@@ -239,6 +239,7 @@ struct compact_control {
        bool no_set_skip_hint;          /* Don't mark blocks for skipping */
        bool ignore_block_suitable;     /* Scan blocks considered unsuitable */
        bool direct_compaction;         /* False from kcompactd or /proc/... */
+       bool proactive_compaction;      /* kcompactd proactive compaction */
        bool whole_zone;                /* Whole zone should/has been scanned */
        bool contended;                 /* Signal lock or sched contention */
        bool rescan;                    /* Rescanning the same pageblock */
@@ -368,7 +369,7 @@ extern void clear_page_mlock(struct page *page);
 static inline void mlock_migrate_page(struct page *newpage, struct page *page)
 {
        if (TestClearPageMlocked(page)) {
-               int nr_pages = hpage_nr_pages(page);
+               int nr_pages = thp_nr_pages(page);
 
                /* Holding pmd lock, no change in irq context: __mod is safe */
                __mod_zone_page_state(page_zone(page), NR_MLOCK, -nr_pages);
@@ -395,7 +396,7 @@ vma_address(struct page *page, struct vm_area_struct *vma)
        unsigned long start, end;
 
        start = __vma_address(page, vma);
-       end = start + PAGE_SIZE * (hpage_nr_pages(page) - 1);
+       end = start + thp_size(page) - PAGE_SIZE;
 
        /* page should be within @vma mapping range */
        VM_BUG_ON_VMA(end < vma->vm_start || start >= vma->vm_end, vma);
@@ -612,5 +613,11 @@ static inline bool is_migrate_highatomic_page(struct page *page)
 }
 
 void setup_zone_pageset(struct zone *zone);
-extern struct page *alloc_new_node_page(struct page *page, unsigned long node);
+
+struct migration_target_control {
+       int nid;                /* preferred node id */
+       nodemask_t *nmask;
+       gfp_t gfp_mask;
+};
+
 #endif /* __MM_INTERNAL_H */