* [PATCH] use __GFP_NOWARN in page cgroup allocation
@ 2009-02-04 8:09 KAMEZAWA Hiroyuki
2009-02-04 8:35 ` Balbir Singh
0 siblings, 1 reply; 3+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-02-04 8:09 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-mm, balbir, heiko.carstens, akpm
This was recommended in
"kmalloc-return-null-instead-of-link-failure.patch added to -mm tree" thread
in the last month.
Thanks,
-Kame
=
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
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>
---
Index: mmotm-2.6.29-Feb03/mm/page_cgroup.c
===================================================================
--- mmotm-2.6.29-Feb03.orig/mm/page_cgroup.c
+++ mmotm-2.6.29-Feb03/mm/page_cgroup.c
@@ -114,7 +114,8 @@ static int __init_refok init_section_pag
nid = page_to_nid(pfn_to_page(pfn));
table_size = sizeof(struct page_cgroup) * PAGES_PER_SECTION;
if (slab_is_available()) {
- base = kmalloc_node(table_size, GFP_KERNEL, nid);
+ base = kmalloc_node(table_size,
+ GFP_KERNEL | __GFP_NOWARN, nid);
if (!base)
base = vmalloc_node(table_size, nid);
} else {
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] use __GFP_NOWARN in page cgroup allocation
2009-02-04 8:09 [PATCH] use __GFP_NOWARN in page cgroup allocation KAMEZAWA Hiroyuki
@ 2009-02-04 8:35 ` Balbir Singh
2009-02-04 11:01 ` Pekka Enberg
0 siblings, 1 reply; 3+ messages in thread
From: Balbir Singh @ 2009-02-04 8:35 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki; +Cc: linux-kernel, linux-mm, heiko.carstens, akpm
* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-02-04 17:09:44]:
> This was recommended in
> "kmalloc-return-null-instead-of-link-failure.patch added to -mm tree" thread
> in the last month.
> Thanks,
> -Kame
> =
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> 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>
> ---
> Index: mmotm-2.6.29-Feb03/mm/page_cgroup.c
> ===================================================================
> --- mmotm-2.6.29-Feb03.orig/mm/page_cgroup.c
> +++ mmotm-2.6.29-Feb03/mm/page_cgroup.c
> @@ -114,7 +114,8 @@ static int __init_refok init_section_pag
> nid = page_to_nid(pfn_to_page(pfn));
> table_size = sizeof(struct page_cgroup) * PAGES_PER_SECTION;
> if (slab_is_available()) {
> - base = kmalloc_node(table_size, GFP_KERNEL, nid);
> + base = kmalloc_node(table_size,
> + GFP_KERNEL | __GFP_NOWARN, nid);
Thanks for getting to this.
> if (!base)
> base = vmalloc_node(table_size, nid);
> } else {
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
--
Balbir
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] use __GFP_NOWARN in page cgroup allocation
2009-02-04 8:35 ` Balbir Singh
@ 2009-02-04 11:01 ` Pekka Enberg
0 siblings, 0 replies; 3+ messages in thread
From: Pekka Enberg @ 2009-02-04 11:01 UTC (permalink / raw)
To: balbir; +Cc: KAMEZAWA Hiroyuki, linux-kernel, linux-mm, heiko.carstens, akpm
On Wed, Feb 4, 2009 at 10:35 AM, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-02-04 17:09:44]:
>
>> This was recommended in
>> "kmalloc-return-null-instead-of-link-failure.patch added to -mm tree" thread
>> in the last month.
>> Thanks,
>> -Kame
>> =
>> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>>
>> 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>
>> ---
>> Index: mmotm-2.6.29-Feb03/mm/page_cgroup.c
>> ===================================================================
>> --- mmotm-2.6.29-Feb03.orig/mm/page_cgroup.c
>> +++ mmotm-2.6.29-Feb03/mm/page_cgroup.c
>> @@ -114,7 +114,8 @@ static int __init_refok init_section_pag
>> nid = page_to_nid(pfn_to_page(pfn));
>> table_size = sizeof(struct page_cgroup) * PAGES_PER_SECTION;
>> if (slab_is_available()) {
>> - base = kmalloc_node(table_size, GFP_KERNEL, nid);
>> + base = kmalloc_node(table_size,
>> + GFP_KERNEL | __GFP_NOWARN, nid);
>
> Thanks for getting to this.
>
>> if (!base)
>> base = vmalloc_node(table_size, nid);
>> } else {
>
> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Looks good to me as well.
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-02-04 11:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-04 8:09 [PATCH] use __GFP_NOWARN in page cgroup allocation KAMEZAWA Hiroyuki
2009-02-04 8:35 ` Balbir Singh
2009-02-04 11:01 ` Pekka Enberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox