linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: remove useless lines in enable_cpucache()
@ 2021-09-30  3:48 Shi Lei
  2021-09-30  8:22 ` Vlastimil Babka
  2021-10-04  1:09 ` David Rientjes
  0 siblings, 2 replies; 3+ messages in thread
From: Shi Lei @ 2021-09-30  3:48 UTC (permalink / raw)
  To: cl, penberg, rientjes, iamjoonsoo.kim, akpm, vbabka
  Cc: linux-mm, linux-kernel, Shi Lei

These lines are useless, so remove them.

Signed-off-by: Shi Lei <shi_lei@massclouds.com>
---
 mm/slab.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index 4d826394ffcb..01775fe0e002 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3900,8 +3900,6 @@ static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp)
 	if (err)
 		goto end;
 
-	if (limit && shared && batchcount)
-		goto skip_setup;
 	/*
 	 * The head array serves three purposes:
 	 * - create a LIFO ordering, i.e. return objects that are cache-warm
@@ -3944,7 +3942,6 @@ static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp)
 		limit = 32;
 #endif
 	batchcount = (limit + 1) / 2;
-skip_setup:
 	err = do_tune_cpucache(cachep, limit, batchcount, shared, gfp);
 end:
 	if (err)
-- 
2.25.1


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

* Re: [PATCH] mm: remove useless lines in enable_cpucache()
  2021-09-30  3:48 [PATCH] mm: remove useless lines in enable_cpucache() Shi Lei
@ 2021-09-30  8:22 ` Vlastimil Babka
  2021-10-04  1:09 ` David Rientjes
  1 sibling, 0 replies; 3+ messages in thread
From: Vlastimil Babka @ 2021-09-30  8:22 UTC (permalink / raw)
  To: Shi Lei, cl, penberg, rientjes, iamjoonsoo.kim, akpm
  Cc: linux-mm, linux-kernel

On 9/30/21 05:48, Shi Lei wrote:
> These lines are useless, so remove them.

I would clarify that they are useless after commit 10befea91b61 ("mm:
memcg/slab: use a single set of kmem_caches for all allocations")



> Signed-off-by: Shi Lei <shi_lei@massclouds.com>

Reviewed-by: Vlastimil Babka <vbabka@suse.cz>

> ---
>  mm/slab.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/mm/slab.c b/mm/slab.c
> index 4d826394ffcb..01775fe0e002 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -3900,8 +3900,6 @@ static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp)
>  	if (err)
>  		goto end;
>  
> -	if (limit && shared && batchcount)
> -		goto skip_setup;
>  	/*
>  	 * The head array serves three purposes:
>  	 * - create a LIFO ordering, i.e. return objects that are cache-warm
> @@ -3944,7 +3942,6 @@ static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp)
>  		limit = 32;
>  #endif
>  	batchcount = (limit + 1) / 2;
> -skip_setup:
>  	err = do_tune_cpucache(cachep, limit, batchcount, shared, gfp);
>  end:
>  	if (err)
> 


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

* Re: [PATCH] mm: remove useless lines in enable_cpucache()
  2021-09-30  3:48 [PATCH] mm: remove useless lines in enable_cpucache() Shi Lei
  2021-09-30  8:22 ` Vlastimil Babka
@ 2021-10-04  1:09 ` David Rientjes
  1 sibling, 0 replies; 3+ messages in thread
From: David Rientjes @ 2021-10-04  1:09 UTC (permalink / raw)
  To: Shi Lei; +Cc: cl, penberg, iamjoonsoo.kim, akpm, vbabka, linux-mm, linux-kernel

On Thu, 30 Sep 2021, Shi Lei wrote:

> These lines are useless, so remove them.
> 
> Signed-off-by: Shi Lei <shi_lei@massclouds.com>

Acked-by: David Rientjes <rientjes@google.com>

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

end of thread, other threads:[~2021-10-04  1:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30  3:48 [PATCH] mm: remove useless lines in enable_cpucache() Shi Lei
2021-09-30  8:22 ` Vlastimil Babka
2021-10-04  1:09 ` David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).