diff options
-rw-r--r-- | mm/page_alloc.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 36be3ba4bbed..2aaafe82f513 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1714,6 +1714,20 @@ try_next_zone: | |||
1714 | return page; | 1714 | return page; |
1715 | } | 1715 | } |
1716 | 1716 | ||
1717 | /* | ||
1718 | * Large machines with many possible nodes should not always dump per-node | ||
1719 | * meminfo in irq context. | ||
1720 | */ | ||
1721 | static inline bool should_suppress_show_mem(void) | ||
1722 | { | ||
1723 | bool ret = false; | ||
1724 | |||
1725 | #if NODES_SHIFT > 8 | ||
1726 | ret = in_interrupt(); | ||
1727 | #endif | ||
1728 | return ret; | ||
1729 | } | ||
1730 | |||
1717 | static inline int | 1731 | static inline int |
1718 | should_alloc_retry(gfp_t gfp_mask, unsigned int order, | 1732 | should_alloc_retry(gfp_t gfp_mask, unsigned int order, |
1719 | unsigned long pages_reclaimed) | 1733 | unsigned long pages_reclaimed) |
@@ -2161,7 +2175,8 @@ nopage: | |||
2161 | " order:%d, mode:0x%x\n", | 2175 | " order:%d, mode:0x%x\n", |
2162 | current->comm, order, gfp_mask); | 2176 | current->comm, order, gfp_mask); |
2163 | dump_stack(); | 2177 | dump_stack(); |
2164 | show_mem(); | 2178 | if (!should_suppress_show_mem()) |
2179 | show_mem(); | ||
2165 | } | 2180 | } |
2166 | return page; | 2181 | return page; |
2167 | got_pg: | 2182 | got_pg: |