summaryrefslogtreecommitdiffstats
path: root/net/atm
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2014-12-12 16:56:16 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-13 12:42:49 -0800
commit5cec38ac866bfb8775638e71a86e4d8cac30caae (patch)
treedbc2549883c7561640c64a72d9acdfe17732e543 /net/atm
parent6b4f7799c6a5703ac6b8c0649f4c22f00fa07513 (diff)
downloadlinux-5cec38ac866bfb8775638e71a86e4d8cac30caae.tar.gz
linux-5cec38ac866bfb8775638e71a86e4d8cac30caae.tar.bz2
linux-5cec38ac866bfb8775638e71a86e4d8cac30caae.zip
fs, seq_file: fallback to vmalloc instead of oom kill processes
Since commit 058504edd026 ("fs/seq_file: fallback to vmalloc allocation"), seq_buf_alloc() falls back to vmalloc() when the kmalloc() for contiguous memory fails. This was done to address order-4 slab allocations for reading /proc/stat on large machines and noticed because PAGE_ALLOC_COSTLY_ORDER < 4, so there is no infinite loop in the page allocator when allocating new slab for such high-order allocations. Contiguous memory isn't necessary for caller of seq_buf_alloc(), however. Other GFP_KERNEL high-order allocations that are <= PAGE_ALLOC_COSTLY_ORDER will simply loop forever in the page allocator and oom kill processes as a result. We don't want to kill processes so that we can allocate contiguous memory in situations when contiguous memory isn't necessary. This patch does the kmalloc() allocation with __GFP_NORETRY for high-order allocations. This still utilizes memory compaction and direct reclaim in the allocation path, the only difference is that it will fail immediately instead of oom kill processes when out of memory. [akpm@linux-foundation.org: add comment] Signed-off-by: David Rientjes <rientjes@google.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/atm')
0 files changed, 0 insertions, 0 deletions