2023-04-13 14:44:57

by Xiongwei Song

[permalink] [raw]
Subject: [PATCH 0/5] Some tiny clean ups for SLUB

From: Xiongwei Song <[email protected]>

Hi,

Just clean ups, no any functionality changed. Thanks for your time.

Xiongwei Song (5):
slub: Correct the error code when slab_kset is NULL
slub: Put objects_show() into CONFIG_SLUB_DEBUG enabled block
slub: Remove CONFIG_SMP defined check
slub: Remove slabs_node() function
slub: Don't read nr_slabs and total_objects directly

mm/slub.c | 45 +++++++++++++++++----------------------------
1 file changed, 17 insertions(+), 28 deletions(-)

--
2.30.2


2023-04-13 14:45:28

by Xiongwei Song

[permalink] [raw]
Subject: [PATCH 4/5] slub: Remove slabs_node() function

From: Xiongwei Song <[email protected]>

When traversing nodes one by one, the get_node() function called in
for_each_kmem_cache_node macro, no need to call get_node() again in
slabs_node(), just reading nr_slabs field should be enough. However, the
node_nr_slabs() function can do this. Hence, the slabs_node() function
is not needed anymore.

Signed-off-by: Xiongwei Song <[email protected]>
---
mm/slub.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index d897df8fe7e7..33b4fec6bc7a 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1344,14 +1344,6 @@ static void remove_full(struct kmem_cache *s, struct kmem_cache_node *n, struct
list_del(&slab->slab_list);
}

-/* Tracking of the number of slabs for debugging purposes */
-static inline unsigned long slabs_node(struct kmem_cache *s, int node)
-{
- struct kmem_cache_node *n = get_node(s, node);
-
- return atomic_long_read(&n->nr_slabs);
-}
-
static inline unsigned long node_nr_slabs(struct kmem_cache_node *n)
{
return atomic_long_read(&n->nr_slabs);
@@ -1722,8 +1714,6 @@ slab_flags_t kmem_cache_flags(unsigned int object_size,

#define disable_higher_order_debug 0

-static inline unsigned long slabs_node(struct kmem_cache *s, int node)
- { return 0; }
static inline unsigned long node_nr_slabs(struct kmem_cache_node *n)
{ return 0; }
static inline void inc_slabs_node(struct kmem_cache *s, int node,
@@ -4599,7 +4589,7 @@ bool __kmem_cache_empty(struct kmem_cache *s)
struct kmem_cache_node *n;

for_each_kmem_cache_node(s, node, n)
- if (n->nr_partial || slabs_node(s, node))
+ if (n->nr_partial || node_nr_slabs(n))
return false;
return true;
}
@@ -4616,7 +4606,7 @@ int __kmem_cache_shutdown(struct kmem_cache *s)
/* Attempt to free all objects */
for_each_kmem_cache_node(s, node, n) {
free_partial(s, n);
- if (n->nr_partial || slabs_node(s, node))
+ if (n->nr_partial || node_nr_slabs(n))
return 1;
}
return 0;
@@ -4829,7 +4819,7 @@ static int __kmem_cache_do_shrink(struct kmem_cache *s)
list_for_each_entry_safe(slab, t, &discard, slab_list)
free_slab(s, slab);

- if (slabs_node(s, node))
+ if (node_nr_slabs(n))
ret = 1;
}

--
2.30.2

2023-04-13 14:45:36

by Xiongwei Song

[permalink] [raw]
Subject: [PATCH 2/5] slub: Put objects_show() into CONFIG_SLUB_DEBUG enabled block

From: Xiongwei Song <[email protected]>

The SO_ALL|SO_OBJECTS pair is only used when enabling CONFIG_SLUB_DEBUG
option, so the objects_show() definition should be surrounded by
CONFIG_SLUB_DEBUG too.

Signed-off-by: Xiongwei Song <[email protected]>
---
mm/slub.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 5cc56f780241..b8afe12ebba1 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -5613,12 +5613,6 @@ static ssize_t cpu_slabs_show(struct kmem_cache *s, char *buf)
}
SLAB_ATTR_RO(cpu_slabs);

-static ssize_t objects_show(struct kmem_cache *s, char *buf)
-{
- return show_slab_objects(s, buf, SO_ALL|SO_OBJECTS);
-}
-SLAB_ATTR_RO(objects);
-
static ssize_t objects_partial_show(struct kmem_cache *s, char *buf)
{
return show_slab_objects(s, buf, SO_PARTIAL|SO_OBJECTS);
@@ -5713,6 +5707,12 @@ static ssize_t total_objects_show(struct kmem_cache *s, char *buf)
}
SLAB_ATTR_RO(total_objects);

+static ssize_t objects_show(struct kmem_cache *s, char *buf)
+{
+ return show_slab_objects(s, buf, SO_ALL|SO_OBJECTS);
+}
+SLAB_ATTR_RO(objects);
+
static ssize_t sanity_checks_show(struct kmem_cache *s, char *buf)
{
return sysfs_emit(buf, "%d\n", !!(s->flags & SLAB_CONSISTENCY_CHECKS));
--
2.30.2

2023-04-13 18:07:02

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 2/5] slub: Put objects_show() into CONFIG_SLUB_DEBUG enabled block

Hi,

kernel test robot noticed the following build errors:

[auto build test ERROR on vbabka-slab/for-next]
[also build test ERROR on linus/master v6.3-rc6 next-20230412]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/sxwjean-me-com/slub-Correct-the-error-code-when-slab_kset-is-NULL/20230413-223743
base: git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git for-next
patch link: https://lore.kernel.org/r/20230413143452.211250-3-sxwjean%40me.com
patch subject: [PATCH 2/5] slub: Put objects_show() into CONFIG_SLUB_DEBUG enabled block
config: i386-randconfig-a012-20230410 (https://download.01.org/0day-ci/archive/20230414/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/356157a450e3905cdc07fd0e77c4ac42974706c7
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review sxwjean-me-com/slub-Correct-the-error-code-when-slab_kset-is-NULL/20230413-223743
git checkout 356157a450e3905cdc07fd0e77c4ac42974706c7
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 olddefconfig
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> mm/slub.c:5947:10: error: 'objects_attr' undeclared here (not in a function); did you mean 'object_size_attr'?
5947 | &objects_attr.attr,
| ^~~~~~~~~~~~
| object_size_attr


vim +5947 mm/slub.c

b84e04f1baeebe6 Imran Khan 2022-08-15 5939
81819f0fc8285a2 Christoph Lameter 2007-05-06 5940 static struct attribute *slab_attrs[] = {
81819f0fc8285a2 Christoph Lameter 2007-05-06 5941 &slab_size_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5942 &object_size_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5943 &objs_per_slab_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5944 &order_attr.attr,
73d342b169db700 David Rientjes 2009-02-22 5945 &min_partial_attr.attr,
49e2258586b4236 Christoph Lameter 2011-08-09 5946 &cpu_partial_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 @5947 &objects_attr.attr,
205ab99dd103e3d Christoph Lameter 2008-04-14 5948 &objects_partial_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5949 &partial_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5950 &cpu_slabs_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5951 &ctor_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5952 &aliases_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5953 &align_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5954 &hwcache_align_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5955 &reclaim_account_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5956 &destroy_by_rcu_attr.attr,
a5a84755c590041 Christoph Lameter 2010-10-05 5957 &shrink_attr.attr,
49e2258586b4236 Christoph Lameter 2011-08-09 5958 &slabs_cpu_partial_attr.attr,
ab4d5ed5eeda4f5 Christoph Lameter 2010-10-05 5959 #ifdef CONFIG_SLUB_DEBUG
a5a84755c590041 Christoph Lameter 2010-10-05 5960 &total_objects_attr.attr,
a5a84755c590041 Christoph Lameter 2010-10-05 5961 &slabs_attr.attr,
a5a84755c590041 Christoph Lameter 2010-10-05 5962 &sanity_checks_attr.attr,
a5a84755c590041 Christoph Lameter 2010-10-05 5963 &trace_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5964 &red_zone_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5965 &poison_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5966 &store_user_attr.attr,
53e15af03be4fda Christoph Lameter 2007-05-06 5967 &validate_attr.attr,
ab4d5ed5eeda4f5 Christoph Lameter 2010-10-05 5968 #endif
81819f0fc8285a2 Christoph Lameter 2007-05-06 5969 #ifdef CONFIG_ZONE_DMA
81819f0fc8285a2 Christoph Lameter 2007-05-06 5970 &cache_dma_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 5971 #endif
81819f0fc8285a2 Christoph Lameter 2007-05-06 5972 #ifdef CONFIG_NUMA
9824601ead957a2 Christoph Lameter 2008-01-07 5973 &remote_node_defrag_ratio_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5974 #endif
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5975 #ifdef CONFIG_SLUB_STATS
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5976 &alloc_fastpath_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5977 &alloc_slowpath_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5978 &free_fastpath_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5979 &free_slowpath_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5980 &free_frozen_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5981 &free_add_partial_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5982 &free_remove_partial_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5983 &alloc_from_partial_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5984 &alloc_slab_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5985 &alloc_refill_attr.attr,
e36a2652d7d1ad9 Christoph Lameter 2011-06-01 5986 &alloc_node_mismatch_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5987 &free_slab_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5988 &cpuslab_flush_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5989 &deactivate_full_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5990 &deactivate_empty_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5991 &deactivate_to_head_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5992 &deactivate_to_tail_attr.attr,
8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5993 &deactivate_remote_frees_attr.attr,
03e404af26dc2ea Christoph Lameter 2011-06-01 5994 &deactivate_bypass_attr.attr,
65c3376aaca96c6 Christoph Lameter 2008-04-14 5995 &order_fallback_attr.attr,
b789ef518b2a723 Christoph Lameter 2011-06-01 5996 &cmpxchg_double_fail_attr.attr,
b789ef518b2a723 Christoph Lameter 2011-06-01 5997 &cmpxchg_double_cpu_fail_attr.attr,
49e2258586b4236 Christoph Lameter 2011-08-09 5998 &cpu_partial_alloc_attr.attr,
49e2258586b4236 Christoph Lameter 2011-08-09 5999 &cpu_partial_free_attr.attr,
8028dcea8abbbd5 Alex Shi 2012-02-03 6000 &cpu_partial_node_attr.attr,
8028dcea8abbbd5 Alex Shi 2012-02-03 6001 &cpu_partial_drain_attr.attr,
81819f0fc8285a2 Christoph Lameter 2007-05-06 6002 #endif
4c13dd3b48fcb6f Dmitry Monakhov 2010-02-26 6003 #ifdef CONFIG_FAILSLAB
4c13dd3b48fcb6f Dmitry Monakhov 2010-02-26 6004 &failslab_attr.attr,
4c13dd3b48fcb6f Dmitry Monakhov 2010-02-26 6005 #endif
346907ceb9d11b9 Vlastimil Babka 2022-11-16 6006 #ifdef CONFIG_HARDENED_USERCOPY
8eb8284b4129061 David Windsor 2017-06-10 6007 &usersize_attr.attr,
346907ceb9d11b9 Vlastimil Babka 2022-11-16 6008 #endif
b84e04f1baeebe6 Imran Khan 2022-08-15 6009 #ifdef CONFIG_KFENCE
b84e04f1baeebe6 Imran Khan 2022-08-15 6010 &skip_kfence_attr.attr,
b84e04f1baeebe6 Imran Khan 2022-08-15 6011 #endif
4c13dd3b48fcb6f Dmitry Monakhov 2010-02-26 6012
81819f0fc8285a2 Christoph Lameter 2007-05-06 6013 NULL
81819f0fc8285a2 Christoph Lameter 2007-05-06 6014 };
81819f0fc8285a2 Christoph Lameter 2007-05-06 6015

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

2023-04-17 07:17:00

by Song, Xiongwei

[permalink] [raw]
Subject: RE: [PATCH 2/5] slub: Put objects_show() into CONFIG_SLUB_DEBUG enabled block

Sorry, the diff should be:

diff --git a/mm/slub.c b/mm/slub.c
index 28ca576d988d..0d99440727a5 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -5613,12 +5613,6 @@ static ssize_t cpu_slabs_show(struct kmem_cache *s, char *buf)
}
SLAB_ATTR_RO(cpu_slabs);

-static ssize_t objects_show(struct kmem_cache *s, char *buf)
-{
- return show_slab_objects(s, buf, SO_ALL|SO_OBJECTS);
-}
-SLAB_ATTR_RO(objects);
-
static ssize_t objects_partial_show(struct kmem_cache *s, char *buf)
{
return show_slab_objects(s, buf, SO_PARTIAL|SO_OBJECTS);
@@ -5713,6 +5707,12 @@ static ssize_t total_objects_show(struct kmem_cache *s, char *buf)
}
SLAB_ATTR_RO(total_objects);

+static ssize_t objects_show(struct kmem_cache *s, char *buf)
+{
+ return show_slab_objects(s, buf, SO_ALL|SO_OBJECTS);
+}
+SLAB_ATTR_RO(objects);
+
static ssize_t sanity_checks_show(struct kmem_cache *s, char *buf)
{
return sysfs_emit(buf, "%d\n", !!(s->flags & SLAB_CONSISTENCY_CHECKS));
@@ -5944,7 +5944,6 @@ static struct attribute *slab_attrs[] = {
&order_attr.attr,
&min_partial_attr.attr,
&cpu_partial_attr.attr,
- &objects_attr.attr,
&objects_partial_attr.attr,
&partial_attr.attr,
&cpu_slabs_attr.attr,
@@ -5958,6 +5957,7 @@ static struct attribute *slab_attrs[] = {
&slabs_cpu_partial_attr.attr,
#ifdef CONFIG_SLUB_DEBUG
&total_objects_attr.attr,
+ &objects_attr.attr,
&slabs_attr.attr,
&sanity_checks_attr.attr,
&trace_attr.attr,

Regards,
Xiongwei

> -----Original Message-----
> From: kernel test robot <[email protected]>
> Sent: 2023年4月14日 1:54
> To: [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; akpm@linux-
> foundation.org; [email protected]; [email protected];
> [email protected]; [email protected]
> Cc: [email protected]; [email protected]; linux-
> [email protected]; [email protected]; Song, Xiongwei
> <[email protected]>
> Subject: Re: [PATCH 2/5] slub: Put objects_show() into
> CONFIG_SLUB_DEBUG enabled block
>
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and
> know the content is safe.
>
> Hi,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on vbabka-slab/for-next]
> [also build test ERROR on linus/master v6.3-rc6 next-20230412]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/sxwjean-me-com/slub-
> Correct-the-error-code-when-slab_kset-is-NULL/20230413-223743
> base: git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git for-next
> patch link: https://lore.kernel.org/r/20230413143452.211250-3-
> sxwjean%40me.com
> patch subject: [PATCH 2/5] slub: Put objects_show() into
> CONFIG_SLUB_DEBUG enabled block
> config: i386-randconfig-a012-20230410 (https://download.01.org/0day-
> ci/archive/20230414/[email protected]/config)
> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
> reproduce (this is a W=1 build):
> # https://github.com/intel-lab-
> lkp/linux/commit/356157a450e3905cdc07fd0e77c4ac42974706c7
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review sxwjean-me-com/slub-Correct-the-error-
> code-when-slab_kset-is-NULL/20230413-223743
> git checkout 356157a450e3905cdc07fd0e77c4ac42974706c7
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> make W=1 O=build_dir ARCH=i386 olddefconfig
> make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <[email protected]>
> | Link: https://lore.kernel.org/oe-kbuild-all/202304140110.lzjsYh25-
> [email protected]/
>
> All errors (new ones prefixed by >>):
>
> >> mm/slub.c:5947:10: error: 'objects_attr' undeclared here (not in a
> function); did you mean 'object_size_attr'?
> 5947 | &objects_attr.attr,
> | ^~~~~~~~~~~~
> | object_size_attr
>
>
> vim +5947 mm/slub.c
>
> b84e04f1baeebe6 Imran Khan 2022-08-15 5939
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5940 static struct attribute
> *slab_attrs[] = {
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5941 &slab_size_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5942
> &object_size_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5943
> &objs_per_slab_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5944 &order_attr.attr,
> 73d342b169db700 David Rientjes 2009-02-22 5945 &min_partial_attr.attr,
> 49e2258586b4236 Christoph Lameter 2011-08-09 5946
> &cpu_partial_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 @5947 &objects_attr.attr,
> 205ab99dd103e3d Christoph Lameter 2008-04-14 5948
> &objects_partial_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5949 &partial_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5950 &cpu_slabs_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5951 &ctor_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5952 &aliases_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5953 &align_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5954
> &hwcache_align_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5955
> &reclaim_account_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5956
> &destroy_by_rcu_attr.attr,
> a5a84755c590041 Christoph Lameter 2010-10-05 5957 &shrink_attr.attr,
> 49e2258586b4236 Christoph Lameter 2011-08-09 5958
> &slabs_cpu_partial_attr.attr,
> ab4d5ed5eeda4f5 Christoph Lameter 2010-10-05 5959 #ifdef
> CONFIG_SLUB_DEBUG
> a5a84755c590041 Christoph Lameter 2010-10-05 5960
> &total_objects_attr.attr,
> a5a84755c590041 Christoph Lameter 2010-10-05 5961 &slabs_attr.attr,
> a5a84755c590041 Christoph Lameter 2010-10-05 5962
> &sanity_checks_attr.attr,
> a5a84755c590041 Christoph Lameter 2010-10-05 5963 &trace_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5964 &red_zone_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5965 &poison_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5966 &store_user_attr.attr,
> 53e15af03be4fda Christoph Lameter 2007-05-06 5967 &validate_attr.attr,
> ab4d5ed5eeda4f5 Christoph Lameter 2010-10-05 5968 #endif
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5969 #ifdef
> CONFIG_ZONE_DMA
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5970
> &cache_dma_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5971 #endif
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 5972 #ifdef CONFIG_NUMA
> 9824601ead957a2 Christoph Lameter 2008-01-07 5973
> &remote_node_defrag_ratio_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5974 #endif
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5975 #ifdef
> CONFIG_SLUB_STATS
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5976
> &alloc_fastpath_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5977
> &alloc_slowpath_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5978
> &free_fastpath_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5979
> &free_slowpath_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5980
> &free_frozen_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5981
> &free_add_partial_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5982
> &free_remove_partial_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5983
> &alloc_from_partial_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5984 &alloc_slab_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5985 &alloc_refill_attr.attr,
> e36a2652d7d1ad9 Christoph Lameter 2011-06-01 5986
> &alloc_node_mismatch_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5987 &free_slab_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5988
> &cpuslab_flush_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5989
> &deactivate_full_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5990
> &deactivate_empty_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5991
> &deactivate_to_head_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5992
> &deactivate_to_tail_attr.attr,
> 8ff12cfc009a2a3 Christoph Lameter 2008-02-07 5993
> &deactivate_remote_frees_attr.attr,
> 03e404af26dc2ea Christoph Lameter 2011-06-01 5994
> &deactivate_bypass_attr.attr,
> 65c3376aaca96c6 Christoph Lameter 2008-04-14 5995
> &order_fallback_attr.attr,
> b789ef518b2a723 Christoph Lameter 2011-06-01 5996
> &cmpxchg_double_fail_attr.attr,
> b789ef518b2a723 Christoph Lameter 2011-06-01 5997
> &cmpxchg_double_cpu_fail_attr.attr,
> 49e2258586b4236 Christoph Lameter 2011-08-09 5998
> &cpu_partial_alloc_attr.attr,
> 49e2258586b4236 Christoph Lameter 2011-08-09 5999
> &cpu_partial_free_attr.attr,
> 8028dcea8abbbd5 Alex Shi 2012-02-03 6000
> &cpu_partial_node_attr.attr,
> 8028dcea8abbbd5 Alex Shi 2012-02-03 6001
> &cpu_partial_drain_attr.attr,
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 6002 #endif
> 4c13dd3b48fcb6f Dmitry Monakhov 2010-02-26 6003 #ifdef
> CONFIG_FAILSLAB
> 4c13dd3b48fcb6f Dmitry Monakhov 2010-02-26 6004 &failslab_attr.attr,
> 4c13dd3b48fcb6f Dmitry Monakhov 2010-02-26 6005 #endif
> 346907ceb9d11b9 Vlastimil Babka 2022-11-16 6006 #ifdef
> CONFIG_HARDENED_USERCOPY
> 8eb8284b4129061 David Windsor 2017-06-10 6007 &usersize_attr.attr,
> 346907ceb9d11b9 Vlastimil Babka 2022-11-16 6008 #endif
> b84e04f1baeebe6 Imran Khan 2022-08-15 6009 #ifdef CONFIG_KFENCE
> b84e04f1baeebe6 Imran Khan 2022-08-15 6010 &skip_kfence_attr.attr,
> b84e04f1baeebe6 Imran Khan 2022-08-15 6011 #endif
> 4c13dd3b48fcb6f Dmitry Monakhov 2010-02-26 6012
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 6013 NULL
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 6014 };
> 81819f0fc8285a2 Christoph Lameter 2007-05-06 6015
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests

2023-04-18 07:58:55

by Vlastimil Babka

[permalink] [raw]
Subject: Re: [PATCH 0/5] Some tiny clean ups for SLUB

On 4/13/23 16:34, [email protected] wrote:
> From: Xiongwei Song <[email protected]>
>
> Hi,
>
> Just clean ups, no any functionality changed. Thanks for your time.

Thanks, added to slab.git for 6.5:

https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git/log/?h=slab/for-6.5/cleanup

> Xiongwei Song (5):
> slub: Correct the error code when slab_kset is NULL
> slub: Put objects_show() into CONFIG_SLUB_DEBUG enabled block
> slub: Remove CONFIG_SMP defined check
> slub: Remove slabs_node() function
> slub: Don't read nr_slabs and total_objects directly
>
> mm/slub.c | 45 +++++++++++++++++----------------------------
> 1 file changed, 17 insertions(+), 28 deletions(-)
>