Re: [PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Glauber Costa
On 08/02/2012 09:10 PM, Johannes Weiner wrote: > On Thu, Aug 02, 2012 at 08:51:31PM +0400, Glauber Costa wrote: >> On 08/02/2012 08:42 PM, Johannes Weiner wrote: >>> On Thu, Aug 02, 2012 at 09:06:41AM -0500, Christoph Lameter wrote: On Thu, 2 Aug 2012, Glauber Costa wrote: > diff

Re: [PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Johannes Weiner
On Thu, Aug 02, 2012 at 08:51:31PM +0400, Glauber Costa wrote: > On 08/02/2012 08:42 PM, Johannes Weiner wrote: > > On Thu, Aug 02, 2012 at 09:06:41AM -0500, Christoph Lameter wrote: > >> On Thu, 2 Aug 2012, Glauber Costa wrote: > >> > >>> diff --git a/mm/slub.c b/mm/slub.c > >>> index

Re: [PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Glauber Costa
On 08/02/2012 08:42 PM, Johannes Weiner wrote: > On Thu, Aug 02, 2012 at 09:06:41AM -0500, Christoph Lameter wrote: >> On Thu, 2 Aug 2012, Glauber Costa wrote: >> >>> diff --git a/mm/slub.c b/mm/slub.c >>> index e517d43..9ca4e20 100644 >>> --- a/mm/slub.c >>> +++ b/mm/slub.c >>> @@ -3453,7 +3453,7

Re: [PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Johannes Weiner
On Thu, Aug 02, 2012 at 09:06:41AM -0500, Christoph Lameter wrote: > On Thu, 2 Aug 2012, Glauber Costa wrote: > > > diff --git a/mm/slub.c b/mm/slub.c > > index e517d43..9ca4e20 100644 > > --- a/mm/slub.c > > +++ b/mm/slub.c > > @@ -3453,7 +3453,7 @@ void kfree(const void *x) > > if

Re: [PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Christoph Lameter
On Thu, 2 Aug 2012, Glauber Costa wrote: > diff --git a/mm/slub.c b/mm/slub.c > index e517d43..9ca4e20 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -3453,7 +3453,7 @@ void kfree(const void *x) > if (unlikely(!PageSlab(page))) { > BUG_ON(!PageCompound(page)); >

[PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Glauber Costa
The slab allocators provide its users with memory regions, with very few placement guarantees. No user should assume an actual page is given by kmalloc calls that are multiple of a page in size. This means that we can be sure that every sane user of the interface would not mess with the page

[PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Glauber Costa
The slab allocators provide its users with memory regions, with very few placement guarantees. No user should assume an actual page is given by kmalloc calls that are multiple of a page in size. This means that we can be sure that every sane user of the interface would not mess with the page

Re: [PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Christoph Lameter
On Thu, 2 Aug 2012, Glauber Costa wrote: diff --git a/mm/slub.c b/mm/slub.c index e517d43..9ca4e20 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3453,7 +3453,7 @@ void kfree(const void *x) if (unlikely(!PageSlab(page))) { BUG_ON(!PageCompound(page));

Re: [PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Johannes Weiner
On Thu, Aug 02, 2012 at 09:06:41AM -0500, Christoph Lameter wrote: On Thu, 2 Aug 2012, Glauber Costa wrote: diff --git a/mm/slub.c b/mm/slub.c index e517d43..9ca4e20 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3453,7 +3453,7 @@ void kfree(const void *x) if

Re: [PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Glauber Costa
On 08/02/2012 08:42 PM, Johannes Weiner wrote: On Thu, Aug 02, 2012 at 09:06:41AM -0500, Christoph Lameter wrote: On Thu, 2 Aug 2012, Glauber Costa wrote: diff --git a/mm/slub.c b/mm/slub.c index e517d43..9ca4e20 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3453,7 +3453,7 @@ void kfree(const

Re: [PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Johannes Weiner
On Thu, Aug 02, 2012 at 08:51:31PM +0400, Glauber Costa wrote: On 08/02/2012 08:42 PM, Johannes Weiner wrote: On Thu, Aug 02, 2012 at 09:06:41AM -0500, Christoph Lameter wrote: On Thu, 2 Aug 2012, Glauber Costa wrote: diff --git a/mm/slub.c b/mm/slub.c index e517d43..9ca4e20 100644

Re: [PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Glauber Costa
On 08/02/2012 09:10 PM, Johannes Weiner wrote: On Thu, Aug 02, 2012 at 08:51:31PM +0400, Glauber Costa wrote: On 08/02/2012 08:42 PM, Johannes Weiner wrote: On Thu, Aug 02, 2012 at 09:06:41AM -0500, Christoph Lameter wrote: On Thu, 2 Aug 2012, Glauber Costa wrote: diff --git a/mm/slub.c