lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3fc79634-da36-88c5-0e5d-10be704f9fb5@huawei.com>
Date:   Wed, 6 Apr 2022 10:38:03 +0800
From:   Miaohe Lin <linmiaohe@...wei.com>
To:     Vlastimil Babka <vbabka@...e.cz>
CC:     <roman.gushchin@...ux.dev>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>, <cl@...ux.com>,
        <penberg@...nel.org>, <rientjes@...gle.com>,
        <iamjoonsoo.kim@....com>, <akpm@...ux-foundation.org>
Subject: Re: [PATCH] mm/slab: remove some unused functions

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@...wei.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.
>   *
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ