mm: remove GFP_HIGHUSER_PAGECACHE
authorHugh Dickins <hugh@veritas.com>
Tue, 6 Jan 2009 22:39:23 +0000 (14:39 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 6 Jan 2009 23:59:01 +0000 (15:59 -0800)
GFP_HIGHUSER_PAGECACHE is just an alias for GFP_HIGHUSER_MOVABLE, making
that harder to track down: remove it, and its out-of-work brothers
GFP_NOFS_PAGECACHE and GFP_USER_PAGECACHE.

Since we're making that improvement to hotremove_migrate_alloc(), I think
we can now also remove one of the "o"s from its comment.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/inode.c
include/linux/gfp.h
mm/memory_hotplug.c

index bd48e5e..a903860 100644 (file)
@@ -166,7 +166,7 @@ struct inode *inode_init_always(struct super_block *sb, struct inode *inode)
        mapping->a_ops = &empty_aops;
        mapping->host = inode;
        mapping->flags = 0;
-       mapping_set_gfp_mask(mapping, GFP_HIGHUSER_PAGECACHE);
+       mapping_set_gfp_mask(mapping, GFP_HIGHUSER_MOVABLE);
        mapping->assoc_mapping = NULL;
        mapping->backing_dev_info = &default_backing_dev_info;
        mapping->writeback_index = 0;
@@ -601,7 +601,7 @@ EXPORT_SYMBOL_GPL(inode_add_to_lists);
  *     @sb: superblock
  *
  *     Allocates a new inode for given superblock. The default gfp_mask
- *     for allocations related to inode->i_mapping is GFP_HIGHUSER_PAGECACHE.
+ *     for allocations related to inode->i_mapping is GFP_HIGHUSER_MOVABLE.
  *     If HIGHMEM pages are unsuitable or it is known that pages allocated
  *     for the page cache are not reclaimable or migratable,
  *     mapping_set_gfp_mask() must be called with suitable flags on the
index e8003af..dd20cd7 100644 (file)
@@ -69,12 +69,6 @@ struct vm_area_struct;
 #define GFP_HIGHUSER_MOVABLE   (__GFP_WAIT | __GFP_IO | __GFP_FS | \
                                 __GFP_HARDWALL | __GFP_HIGHMEM | \
                                 __GFP_MOVABLE)
-#define GFP_NOFS_PAGECACHE     (__GFP_WAIT | __GFP_IO | __GFP_MOVABLE)
-#define GFP_USER_PAGECACHE     (__GFP_WAIT | __GFP_IO | __GFP_FS | \
-                                __GFP_HARDWALL | __GFP_MOVABLE)
-#define GFP_HIGHUSER_PAGECACHE (__GFP_WAIT | __GFP_IO | __GFP_FS | \
-                                __GFP_HARDWALL | __GFP_HIGHMEM | \
-                                __GFP_MOVABLE)
 
 #ifdef CONFIG_NUMA
 #define GFP_THISNODE   (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY)
index 2ba38bc..c083cf5 100644 (file)
@@ -627,15 +627,12 @@ int scan_lru_pages(unsigned long start, unsigned long end)
 }
 
 static struct page *
-hotremove_migrate_alloc(struct page *page,
-                       unsigned long private,
-                       int **x)
+hotremove_migrate_alloc(struct page *page, unsigned long private, int **x)
 {
-       /* This should be improoooooved!! */
-       return alloc_page(GFP_HIGHUSER_PAGECACHE);
+       /* This should be improooooved!! */
+       return alloc_page(GFP_HIGHUSER_MOVABLE);
 }
 
-
 #define NR_OFFLINE_AT_ONCE_PAGES       (256)
 static int
 do_migrate_range(unsigned long start_pfn, unsigned long end_pfn)