aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2011-05-24 20:11:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-25 11:39:03 -0400
commit7bf02ea22c6cdd09e2d3f1d3c3fe366b834ae9af (patch)
treec1c8aa415910e0f0deea1181759ddd2b5d6067fb /include/linux/mm.h
parent851cc856d73d1185243c149ed0c0839df8a1b2fe (diff)
arch, mm: filter disallowed nodes from arch specific show_mem functions
Architectures that implement their own show_mem() function did not pass the filter argument to show_free_areas() to appropriately avoid emitting the state of nodes that are disallowed in the current context. This patch now passes the filter argument to show_free_areas() so those nodes are now avoided. This patch also removes the show_free_areas() wrapper around __show_free_areas() and converts existing callers to pass an empty filter. ia64 emits additional information for each node, so skip_free_areas_zone() must be made global to filter disallowed nodes and it is converted to use a nid argument rather than a zone for this use case. Signed-off-by: David Rientjes <rientjes@google.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Helge Deller <deller@gmx.de> Cc: James Bottomley <jejb@parisc-linux.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 6507dde38b16..1746f67c33de 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -862,13 +862,13 @@ extern void pagefault_out_of_memory(void);
862#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) 862#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK)
863 863
864/* 864/*
865 * Flags passed to show_mem() and __show_free_areas() to suppress output in 865 * Flags passed to show_mem() and show_free_areas() to suppress output in
866 * various contexts. 866 * various contexts.
867 */ 867 */
868#define SHOW_MEM_FILTER_NODES (0x0001u) /* filter disallowed nodes */ 868#define SHOW_MEM_FILTER_NODES (0x0001u) /* filter disallowed nodes */
869 869
870extern void show_free_areas(void); 870extern void show_free_areas(unsigned int flags);
871extern void __show_free_areas(unsigned int flags); 871extern bool skip_free_areas_node(unsigned int flags, int nid);
872 872
873int shmem_lock(struct file *file, int lock, struct user_struct *user); 873int shmem_lock(struct file *file, int lock, struct user_struct *user);
874struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags); 874struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags);