Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

KAMEZAWA Hiroyuki and committed by
Linus Torvalds
2e9c2372 d4097456

+2 -1
+2 -1
mm/page_cgroup.c
··· 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 {