[PATCH v2] SLUB: Add support for per object memory policies
Christoph Lameter (Ampere)
cl at gentwo.org
Thu Sep 12 15:21:02 PDT 2024
On Thu, 12 Sep 2024, Matthew Wilcox wrote:
> On Thu, Sep 12, 2024 at 09:15:34AM -0700, Christoph Lameter (Ampere) wrote:
> > > sparse warnings: (new ones prefixed by >>)
> > > >> mm/slub.c:222:1: sparse: sparse: symbol 'strict_numa' was not declared. Should it be static?
> >
> >
> > Ummm.. This code declares strict_numa. Whats wrong with sparc64 / sparse ?
> >
> > > vim +/strict_numa +222 mm/slub.c
> > >
> > > 220
> > > 221 #ifdef CONFIG_NUMA
> > > > 222 DEFINE_STATIC_KEY_FALSE(strict_numa);
>
> maybe this should be:
>
> static DEFINE_STATIC_KEY_FALSE(strict_numa);
Ah double staticity. Thanks.
>From b239f4f26094845af74b091682f0bdcae56b5123 Mon Sep 17 00:00:00 2001
From: Christoph Lameter <cl at gentwo.org>
Date: Thu, 12 Sep 2024 15:15:07 -0700
Subject: [PATCH 3/3] [SLUB] Make strict_numa static
strict_numa is only used in mm/slub.c so it can be static.
Signed-off-by: Christoph Lameter <cl at linux.com>
---
mm/slub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/slub.c b/mm/slub.c
index 2fa7c35e076a..56e320082c09 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -219,7 +219,7 @@ DEFINE_STATIC_KEY_FALSE(slub_debug_enabled);
#endif /* CONFIG_SLUB_DEBUG */
#ifdef CONFIG_NUMA
-DEFINE_STATIC_KEY_FALSE(strict_numa);
+static DEFINE_STATIC_KEY_FALSE(strict_numa);
#endif
/* Structure holding parameters for get_partial() call chain */
--
2.39.2
More information about the linux-arm-kernel
mailing list