linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Miaohe Lin <linmiaohe@huawei.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: <roman.gushchin@linux.dev>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>, <cl@linux.com>,
	<penberg@kernel.org>, <rientjes@google.com>,
	<iamjoonsoo.kim@lge.com>, <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm/slab: remove some unused functions
Date: Wed, 6 Apr 2022 10:38:03 +0800	[thread overview]
Message-ID: <3fc79634-da36-88c5-0e5d-10be704f9fb5@huawei.com> (raw)
In-Reply-To: <b7871192-8c93-e478-e93f-be9e4150dd1f@suse.cz>

On 2022/4/4 20:49, Vlastimil Babka wrote:
> On 3/22/22 10:14, Miaohe Lin wrote:
>> alternate_node_alloc and ____cache_alloc_node are always called when
>> CONFIG_NUMA. So we can remove the unused !CONFIG_NUMA variant. Also
>> forward declaration for alternate_node_alloc is unnecessary. Remove
>> it too.
>>
>> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
>> ---
> 
> Adding to the slab tree, thanks.
> 
> Included also this move of declaration closer to its users:

Many thanks for doing this. :)

> 
> diff --git a/mm/slab.c b/mm/slab.c
> index 4ea12ddaa7db..90b16c7ae01a 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -626,8 +626,6 @@ static inline gfp_t gfp_exact_node(gfp_t flags)
>  
>  #else  /* CONFIG_NUMA */
>  
> -static void *____cache_alloc_node(struct kmem_cache *, gfp_t, int);
> -
>  static struct alien_cache *__alloc_alien_cache(int node, int entries,
>                                                 int batch, gfp_t gfp)
>  {
> @@ -3043,6 +3041,8 @@ static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags)
>  }
>  
>  #ifdef CONFIG_NUMA
> +static void *____cache_alloc_node(struct kmem_cache *, gfp_t, int);
> +
>  /*
>   * Try allocating on another node if PFA_SPREAD_SLAB is a mempolicy is set.
>   *
> 
> .
> 



  reply	other threads:[~2022-04-06  2:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22  9:14 Miaohe Lin
2022-04-01  6:16 ` Miaohe Lin
2022-04-01 10:29 ` David Hildenbrand
2022-04-04 12:49 ` Vlastimil Babka
2022-04-06  2:38   ` Miaohe Lin [this message]
2022-04-04 19:10 ` Roman Gushchin

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=3fc79634-da36-88c5-0e5d-10be704f9fb5@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.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 \
    --cc=vbabka@suse.cz \
    /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