mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jianfeng Wang <jianfeng.w.wang@oracle.com>
To: Bert Karwatzki <spasswolf@web.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [External] : [PATCH] mm: slub: Fix compilation without CONFIG_SLUB_DEBUG
Date: Tue, 23 Apr 2024 10:37:43 -0700	[thread overview]
Message-ID: <ee56b1c9-c783-4adf-8ea1-6601cbfb9535@oracle.com> (raw)
In-Reply-To: <20240423124025.193812-1-spasswolf@web.de>



On 4/23/24 5:40 AM, Bert Karwatzki wrote:
> Since the introduction of count_partial_free_approx the compilation of
> linux fails with an implicit declaration of function ‘node_nr_objs’
> because count_partial_free_approx is compiled when SLAB_SUPPORTS_SYSFS
> is defined even without CONFIG_SLUB_DEBUG. As count_partial_free_approx
> is only used when CONFIG_SLUB_DEBUG is defined it should only be
> compiled in that case.
> 

Hi Bert,

Thanks for noticing this.
The original patch was updated to fix it and was sent to the MM maillist.
It has been applied several hours ago.

Link: https://lore.kernel.org/linux-mm/20240423045554.15045-1-jianfeng.w.wang@oracle.com/T/#m6ec634d0d214bea8807deac8cb15bf27dd47743d

> Fixes: commit 1c5610f451be ("slub: introduce count_partial_free_approx()")
> Signed-off-by: Bert Karwatzki <spasswolf@web.de>
> ---
>  mm/slub.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/slub.c b/mm/slub.c
> index a3b6f05be2b9..a547ed041bc7 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -3226,6 +3226,7 @@ static inline int node_match(struct slab *slab, int node)
>  }
> 
>  #ifdef CONFIG_SLUB_DEBUG
> +#define MAX_PARTIAL_TO_SCAN 10000
>  static int count_free(struct slab *slab)
>  {
>  	return slab->objects - slab->inuse;
> @@ -3293,10 +3294,6 @@ static inline bool free_debug_processing(struct kmem_cache *s,
> 
>  	return checks_ok;
>  }
> -#endif /* CONFIG_SLUB_DEBUG */
> -
> -#if defined(CONFIG_SLUB_DEBUG) || defined(SLAB_SUPPORTS_SYSFS)
> -#define MAX_PARTIAL_TO_SCAN 10000
> 
>  static unsigned long count_partial_free_approx(struct kmem_cache_node *n)
>  {
> @@ -3332,7 +3329,9 @@ static unsigned long count_partial_free_approx(struct kmem_cache_node *n)
>  	spin_unlock_irqrestore(&n->list_lock, flags);
>  	return x;
>  }
> +#endif /* CONFIG_SLUB_DEBUG */
> 
> +#if defined(CONFIG_SLUB_DEBUG) || defined(SLAB_SUPPORTS_SYSFS)
>  static unsigned long count_partial(struct kmem_cache_node *n,
>  					int (*get_count)(struct slab *))
>  {
> --
> 2.43.0
> 

      reply	other threads:[~2024-04-23 17:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 12:40 Bert Karwatzki
2024-04-23 17:37 ` Jianfeng Wang [this message]

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=ee56b1c9-c783-4adf-8ea1-6601cbfb9535@oracle.com \
    --to=jianfeng.w.wang@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spasswolf@web.de \
    /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

all inboxes | Powered by JetHome®