diff options
author | David Rientjes <rientjes@google.com> | 2011-03-22 19:30:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 20:44:01 -0400 |
commit | ddd588b5dd55f14320379961e47683db4e4c1d90 (patch) | |
tree | 09de73c51c8c5e701e644236890a5d205ec3cdc9 /include/linux/mm.h | |
parent | 94dcf29a11b3d20a28790598d701f98484a969da (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.h | 8 |
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 | |||
862 | extern void show_free_areas(void); | 868 | extern void show_free_areas(void); |
869 | extern void __show_free_areas(unsigned int flags); | ||
863 | 870 | ||
864 | int shmem_lock(struct file *file, int lock, struct user_struct *user); | 871 | int shmem_lock(struct file *file, int lock, struct user_struct *user); |
865 | struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags); | 872 | struct 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); | |||
1348 | extern void mem_init(void); | 1355 | extern void mem_init(void); |
1349 | extern void __init mmap_init(void); | 1356 | extern void __init mmap_init(void); |
1350 | extern void show_mem(void); | 1357 | extern void show_mem(void); |
1358 | extern void __show_mem(unsigned int flags); | ||
1351 | extern void si_meminfo(struct sysinfo * val); | 1359 | extern void si_meminfo(struct sysinfo * val); |
1352 | extern void si_meminfo_node(struct sysinfo *val, int nid); | 1360 | extern void si_meminfo_node(struct sysinfo *val, int nid); |
1353 | extern int after_bootmem; | 1361 | extern int after_bootmem; |