aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2011-03-22 19:30:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-22 20:44:01 -0400
commitddd588b5dd55f14320379961e47683db4e4c1d90 (patch)
tree09de73c51c8c5e701e644236890a5d205ec3cdc9 /include/linux/mm.h
parent94dcf29a11b3d20a28790598d701f98484a969da (diff)
oom: suppress nodes that are not allowed from meminfo on oom kill
The oom killer is extremely verbose for machines with a large number of cpus and/or nodes. This verbosity can often be harmful if it causes other important messages to be scrolled from the kernel log and incurs a signicant time delay, specifically for kernels with CONFIG_NODES_SHIFT > 8. This patch causes only memory information to be displayed for nodes that are allowed by current's cpuset when dumping the VM state. Information for all other nodes is irrelevant to the oom condition; we don't care if there's an abundance of memory elsewhere if we can't access it. This only affects the behavior of dumping memory information when an oom is triggered. Other dumps, such as for sysrq+m, still display the unfiltered form when using the existing show_mem() interface. Additionally, the per-cpu pageset statistics are extremely verbose in oom killer output, so it is now suppressed. This removes nodes_weight(current->mems_allowed) * (1 + nr_cpus) lines from the oom killer output. Callers may use __show_mem(SHOW_MEM_FILTER_NODES) to filter disallowed nodes. Signed-off-by: David Rientjes <rientjes@google.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> 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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 581703d86fbd..1f82adc85352 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -859,7 +859,14 @@ extern void pagefault_out_of_memory(void);
859 859
860#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) 860#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK)
861 861
862/*
863 * Flags passed to __show_mem() and __show_free_areas() to suppress output in
864 * various contexts.
865 */
866#define SHOW_MEM_FILTER_NODES (0x0001u) /* filter disallowed nodes */
867
862extern void show_free_areas(void); 868extern void show_free_areas(void);
869extern void __show_free_areas(unsigned int flags);
863 870
864int shmem_lock(struct file *file, int lock, struct user_struct *user); 871int shmem_lock(struct file *file, int lock, struct user_struct *user);
865struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags); 872struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags);
@@ -1348,6 +1355,7 @@ extern void calculate_zone_inactive_ratio(struct zone *zone);
1348extern void mem_init(void); 1355extern void mem_init(void);
1349extern void __init mmap_init(void); 1356extern void __init mmap_init(void);
1350extern void show_mem(void); 1357extern void show_mem(void);
1358extern void __show_mem(unsigned int flags);
1351extern void si_meminfo(struct sysinfo * val); 1359extern void si_meminfo(struct sysinfo * val);
1352extern void si_meminfo_node(struct sysinfo *val, int nid); 1360extern void si_meminfo_node(struct sysinfo *val, int nid);
1353extern int after_bootmem; 1361extern int after_bootmem;