linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Miaohe Lin <linmiaohe@huawei.com>,
	cl@linux.com, penberg@kernel.org, rientjes@google.com,
	iamjoonsoo.kim@lge.com, akpm@linux-foundation.org
Cc: roman.gushchin@linux.dev, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/slub: remove unused kmem_cache_order_objects max
Date: Fri, 29 Apr 2022 11:48:48 +0200	[thread overview]
Message-ID: <5681e266-36ec-f389-20c4-399bc5295898@suse.cz> (raw)
In-Reply-To: <20220429090545.33413-1-linmiaohe@huawei.com>

On 4/29/22 11:05, Miaohe Lin wrote:
> max field holds the largest slab order that was ever used for a slab cache.
> But it's unused now. Remove it.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Added to slab tree, thanks.

> ---
>  include/linux/slub_def.h | 1 -
>  mm/slub.c                | 2 --
>  2 files changed, 3 deletions(-)
> 
> diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
> index 33c5c0e3bd8d..f9c68a9dac04 100644
> --- a/include/linux/slub_def.h
> +++ b/include/linux/slub_def.h
> @@ -105,7 +105,6 @@ struct kmem_cache {
>  	struct kmem_cache_order_objects oo;
>  
>  	/* Allocation and freeing of slabs */
> -	struct kmem_cache_order_objects max;
>  	struct kmem_cache_order_objects min;
>  	gfp_t allocflags;	/* gfp flags to use on each alloc */
>  	int refcount;		/* Refcount for slab cache destroy */
> diff --git a/mm/slub.c b/mm/slub.c
> index 1f699ddfff7f..e5535020e0fd 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -4162,8 +4162,6 @@ static int calculate_sizes(struct kmem_cache *s)
>  	 */
>  	s->oo = oo_make(order, size);
>  	s->min = oo_make(get_order(size), size);
> -	if (oo_objects(s->oo) > oo_objects(s->max))
> -		s->max = s->oo;
>  
>  	return !!oo_objects(s->oo);
>  }


  reply	other threads:[~2022-04-29  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29  9:05 [PATCH] mm/slub: remove unused kmem_cache_order_objects max Miaohe Lin
2022-04-29  9:48 ` Vlastimil Babka [this message]
2022-04-29 11:38 ` Muchun Song
2022-05-02  0:07 ` David Rientjes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5681e266-36ec-f389-20c4-399bc5295898@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).