Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-28 Thread Yinghai Lu
On Fri, Dec 28, 2012 at 6:42 AM, JoonSoo Kim wrote: > > I have a different idea. > How about removing fallback allocation in bootmem.c completely? > I don't know why it is there exactly. > But, warning for 'slab_is_available()' is there for a long time. > So, most people who misuse fallback

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-28 Thread JoonSoo Kim
Hello, Sasha. 2012/12/28 Sasha Levin : > On 12/27/2012 06:04 PM, David Rientjes wrote: >> On Thu, 27 Dec 2012, Sasha Levin wrote: >> >>> That's exactly what happens with the patch. Note that in the current >>> upstream >>> version there are several slab checks scattered all over. >>> >>> In this

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-28 Thread JoonSoo Kim
Hello, Sasha. 2012/12/28 Sasha Levin sasha.le...@oracle.com: On 12/27/2012 06:04 PM, David Rientjes wrote: On Thu, 27 Dec 2012, Sasha Levin wrote: That's exactly what happens with the patch. Note that in the current upstream version there are several slab checks scattered all over. In

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-28 Thread Yinghai Lu
On Fri, Dec 28, 2012 at 6:42 AM, JoonSoo Kim js1...@gmail.com wrote: I have a different idea. How about removing fallback allocation in bootmem.c completely? I don't know why it is there exactly. But, warning for 'slab_is_available()' is there for a long time. So, most people who misuse

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread Sasha Levin
On 12/27/2012 06:04 PM, David Rientjes wrote: > On Thu, 27 Dec 2012, Sasha Levin wrote: > >> That's exactly what happens with the patch. Note that in the current upstream >> version there are several slab checks scattered all over. >> >> In this case for example, I'm removing it from

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread David Rientjes
On Thu, 27 Dec 2012, Sasha Levin wrote: > That's exactly what happens with the patch. Note that in the current upstream > version there are several slab checks scattered all over. > > In this case for example, I'm removing it from __alloc_bootmem_node(), but the > first code line

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread Sasha Levin
On 12/27/2012 05:25 PM, David Rientjes wrote: > On Sun, 23 Dec 2012, Sasha Levin wrote: > >> diff --git a/mm/bootmem.c b/mm/bootmem.c >> index 1324cd7..198a92f 100644 >> --- a/mm/bootmem.c >> +++ b/mm/bootmem.c >> @@ -763,9 +763,6 @@ void * __init ___alloc_bootmem_node(pg_data_t *pgdat, >>

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread Pekka Enberg
On Fri, Dec 28, 2012 at 12:31 AM, David Rientjes wrote: > On Fri, 28 Dec 2012, Pekka Enberg wrote: > >> On Sun, 23 Dec 2012, Sasha Levin wrote: >> >> diff --git a/mm/bootmem.c b/mm/bootmem.c >> >> index 1324cd7..198a92f 100644 >> >> --- a/mm/bootmem.c >> >> +++ b/mm/bootmem.c >> >> @@ -763,9

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread David Rientjes
On Fri, 28 Dec 2012, Pekka Enberg wrote: > On Sun, 23 Dec 2012, Sasha Levin wrote: > >> diff --git a/mm/bootmem.c b/mm/bootmem.c > >> index 1324cd7..198a92f 100644 > >> --- a/mm/bootmem.c > >> +++ b/mm/bootmem.c > >> @@ -763,9 +763,6 @@ void * __init ___alloc_bootmem_node(pg_data_t *pgdat, > >>

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread Pekka Enberg
On Sun, 23 Dec 2012, Sasha Levin wrote: >> diff --git a/mm/bootmem.c b/mm/bootmem.c >> index 1324cd7..198a92f 100644 >> --- a/mm/bootmem.c >> +++ b/mm/bootmem.c >> @@ -763,9 +763,6 @@ void * __init ___alloc_bootmem_node(pg_data_t *pgdat, >> unsigned long size, >> void * __init

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread David Rientjes
On Sun, 23 Dec 2012, Sasha Levin wrote: > diff --git a/mm/bootmem.c b/mm/bootmem.c > index 1324cd7..198a92f 100644 > --- a/mm/bootmem.c > +++ b/mm/bootmem.c > @@ -763,9 +763,6 @@ void * __init ___alloc_bootmem_node(pg_data_t *pgdat, > unsigned long size, > void * __init

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread David Rientjes
On Sun, 23 Dec 2012, Sasha Levin wrote: diff --git a/mm/bootmem.c b/mm/bootmem.c index 1324cd7..198a92f 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -763,9 +763,6 @@ void * __init ___alloc_bootmem_node(pg_data_t *pgdat, unsigned long size, void * __init __alloc_bootmem_node(pg_data_t

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread Pekka Enberg
On Sun, 23 Dec 2012, Sasha Levin wrote: diff --git a/mm/bootmem.c b/mm/bootmem.c index 1324cd7..198a92f 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -763,9 +763,6 @@ void * __init ___alloc_bootmem_node(pg_data_t *pgdat, unsigned long size, void * __init __alloc_bootmem_node(pg_data_t

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread David Rientjes
On Fri, 28 Dec 2012, Pekka Enberg wrote: On Sun, 23 Dec 2012, Sasha Levin wrote: diff --git a/mm/bootmem.c b/mm/bootmem.c index 1324cd7..198a92f 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -763,9 +763,6 @@ void * __init ___alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread Pekka Enberg
On Fri, Dec 28, 2012 at 12:31 AM, David Rientjes rient...@google.com wrote: On Fri, 28 Dec 2012, Pekka Enberg wrote: On Sun, 23 Dec 2012, Sasha Levin wrote: diff --git a/mm/bootmem.c b/mm/bootmem.c index 1324cd7..198a92f 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -763,9 +763,6 @@

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread Sasha Levin
On 12/27/2012 05:25 PM, David Rientjes wrote: On Sun, 23 Dec 2012, Sasha Levin wrote: diff --git a/mm/bootmem.c b/mm/bootmem.c index 1324cd7..198a92f 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -763,9 +763,6 @@ void * __init ___alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread David Rientjes
On Thu, 27 Dec 2012, Sasha Levin wrote: That's exactly what happens with the patch. Note that in the current upstream version there are several slab checks scattered all over. In this case for example, I'm removing it from __alloc_bootmem_node(), but the first code line

Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-27 Thread Sasha Levin
On 12/27/2012 06:04 PM, David Rientjes wrote: On Thu, 27 Dec 2012, Sasha Levin wrote: That's exactly what happens with the patch. Note that in the current upstream version there are several slab checks scattered all over. In this case for example, I'm removing it from

[PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-23 Thread Sasha Levin
Bootmem alloc functions are supposed to panic if allocation fails unless a *_nopanic() function is used. However, if slab is available this is not the case currently, and the function might return a NULL. Currect it to panic on failed allocations even if slab is available. Signed-off-by: Sasha

[PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if slab is available

2012-12-23 Thread Sasha Levin
Bootmem alloc functions are supposed to panic if allocation fails unless a *_nopanic() function is used. However, if slab is available this is not the case currently, and the function might return a NULL. Currect it to panic on failed allocations even if slab is available. Signed-off-by: Sasha