Commit 2e9c23724328ae4e56c42a35a717a956d7d3001d
Committed by
Linus Torvalds
1 parent
d4097456cd
Exists in
master
and in
39 other branches
memcg: use __GFP_NOWARN in page cgroup allocation
page_cgroup's page allocation at init/memory hotplug uses kmalloc() and vmalloc(). If kmalloc() failes, vmalloc() is used. This is because vmalloc() is very limited resource on 32bit systems. We want to use kmalloc() first. But in this kind of call, __GFP_NOWARN should be specified. Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
mm/page_cgroup.c
... | ... | @@ -114,7 +114,8 @@ |
114 | 114 | nid = page_to_nid(pfn_to_page(pfn)); |
115 | 115 | table_size = sizeof(struct page_cgroup) * PAGES_PER_SECTION; |
116 | 116 | if (slab_is_available()) { |
117 | - base = kmalloc_node(table_size, GFP_KERNEL, nid); | |
117 | + base = kmalloc_node(table_size, | |
118 | + GFP_KERNEL | __GFP_NOWARN, nid); | |
118 | 119 | if (!base) |
119 | 120 | base = vmalloc_node(table_size, nid); |
120 | 121 | } else { |