All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] slub: remove obsolete code path in __slab_free() for per cpu partial
@ 2011-09-09  9:02 Alex,Shi
  2011-09-09  9:06 ` Alex,Shi
  0 siblings, 1 reply; 4+ messages in thread
From: Alex,Shi @ 2011-09-09  9:02 UTC (permalink / raw)
  To: cl, Pekka Enberg; +Cc: akpm, linux-mm, Chen, Tim C, Huang, Ying

If there are still some objects left in slab, the slab page will be put
to per cpu partial list. So remove the obsolete code path.


Signed-off-by: Alex Shi <alex.shi@intel.com>
---
 mm/slub.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 492beab..bca8eee 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2526,20 +2526,9 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
 	 */
 	if (was_frozen)
 		stat(s, FREE_FROZEN);
-	else {
-		if (unlikely(!inuse && n->nr_partial > s->min_partial))
+	else if (unlikely(!inuse && n->nr_partial > s->min_partial))
                         goto slab_empty;
 
-		/*
-		 * Objects left in the slab. If it was not on the partial list before
-		 * then add it.
-		 */
-		if (unlikely(!prior)) {
-			remove_full(s, page);
-			add_partial(n, page, 0);
-			stat(s, FREE_ADD_PARTIAL);
-		}
-	}
 	spin_unlock_irqrestore(&n->list_lock, flags);
 	return;
 
-- 
1.7.0



--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] slub: remove obsolete code path in __slab_free() for per cpu partial
  2011-09-09  9:02 [PATCH 1/2] slub: remove obsolete code path in __slab_free() for per cpu partial Alex,Shi
@ 2011-09-09  9:06 ` Alex,Shi
  2011-09-12 15:24   ` Christoph Lameter
  0 siblings, 1 reply; 4+ messages in thread
From: Alex,Shi @ 2011-09-09  9:06 UTC (permalink / raw)
  To: cl; +Cc: Pekka Enberg, akpm, linux-mm, Chen, Tim C, Huang, Ying

Resend for correction CC e-mail address. Sorry. 

On Fri, 2011-09-09 at 17:02 +0800, Alex,Shi wrote:
> If there are still some objects left in slab, the slab page will be put
> to per cpu partial list. So remove the obsolete code path.
> 
> 
> Signed-off-by: Alex Shi <alex.shi@intel.com>
> ---
>  mm/slub.c |   13 +------------
>  1 files changed, 1 insertions(+), 12 deletions(-)
> 
> diff --git a/mm/slub.c b/mm/slub.c
> index 492beab..bca8eee 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -2526,20 +2526,9 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
>  	 */
>  	if (was_frozen)
>  		stat(s, FREE_FROZEN);
> -	else {
> -		if (unlikely(!inuse && n->nr_partial > s->min_partial))
> +	else if (unlikely(!inuse && n->nr_partial > s->min_partial))
>                          goto slab_empty;
>  
> -		/*
> -		 * Objects left in the slab. If it was not on the partial list before
> -		 * then add it.
> -		 */
> -		if (unlikely(!prior)) {
> -			remove_full(s, page);
> -			add_partial(n, page, 0);
> -			stat(s, FREE_ADD_PARTIAL);
> -		}
> -	}
>  	spin_unlock_irqrestore(&n->list_lock, flags);
>  	return;
>  


--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] slub: remove obsolete code path in __slab_free() for per cpu partial
  2011-09-09  9:06 ` Alex,Shi
@ 2011-09-12 15:24   ` Christoph Lameter
  2011-09-13 13:38     ` Shi, Alex
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Lameter @ 2011-09-12 15:24 UTC (permalink / raw)
  To: Alex,Shi; +Cc: Pekka Enberg, akpm, linux-mm, Chen, Tim C, Huang, Ying

On Fri, 9 Sep 2011, Alex,Shi wrote:

> On Fri, 2011-09-09 at 17:02 +0800, Alex,Shi wrote:
> > If there are still some objects left in slab, the slab page will be put
> > to per cpu partial list. So remove the obsolete code path.

Did you run this with debugging on? I think the code is needed then.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH 1/2] slub: remove obsolete code path in __slab_free() for per cpu partial
  2011-09-12 15:24   ` Christoph Lameter
@ 2011-09-13 13:38     ` Shi, Alex
  0 siblings, 0 replies; 4+ messages in thread
From: Shi, Alex @ 2011-09-13 13:38 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: Pekka Enberg, akpm, linux-mm, Chen, Tim C, Huang, Ying

> 
> > On Fri, 2011-09-09 at 17:02 +0800, Alex,Shi wrote:
> > > If there are still some objects left in slab, the slab page will be put
> > > to per cpu partial list. So remove the obsolete code path.
> 
> Did you run this with debugging on? I think the code is needed then.

Um, yes, debug_on will pass here. Sorry for missing this. 

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-13 13:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-09  9:02 [PATCH 1/2] slub: remove obsolete code path in __slab_free() for per cpu partial Alex,Shi
2011-09-09  9:06 ` Alex,Shi
2011-09-12 15:24   ` Christoph Lameter
2011-09-13 13:38     ` Shi, Alex

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.