* [PATCH] mm/slab: remove unused slab_early_init
@ 2022-12-17 11:30 gouhao
2022-12-18 2:06 ` Hyeonggon Yoo
0 siblings, 1 reply; 3+ messages in thread
From: gouhao @ 2022-12-17 11:30 UTC (permalink / raw)
To: cl, penberg, rientjes, iamjoonsoo.kim, akpm, vbabka,
roman.gushchin, 42.hyeyoo, keescook
Cc: linux-mm, linux-kernel, linux-hardening, mingo, gouhaojake, Gou Hao
From: Gou Hao <gouhao@uniontech.com>
'slab_early_init' was introduced by 'commit e0a42726794f
("[PATCH] mm/slab.c: fix early init assumption")', this
flag was used to prevented off-slab caches being created
so early during bootup.
The only user of 'slab_early_init' was removed in commit
'3217fd9bdf00 ("mm/slab: make criteria for off slab
determination robust and simple")'.
Signed-off-by: Gou Hao <gouhao@uniontech.com>
---
mm/slab.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index 7a269db050ee..ede1f29fd81c 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -220,7 +220,6 @@ static inline void fixup_objfreelist_debug(struct kmem_cache *cachep,
static inline void fixup_slab_list(struct kmem_cache *cachep,
struct kmem_cache_node *n, struct slab *slab,
void **list);
-static int slab_early_init = 1;
#define INDEX_NODE kmalloc_index(sizeof(struct kmem_cache_node))
@@ -1249,8 +1248,6 @@ void __init kmem_cache_init(void)
slab_state = PARTIAL_NODE;
setup_kmalloc_cache_index_table();
- slab_early_init = 0;
-
/* 5) Replace the bootstrap kmem_cache_node */
{
int nid;
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/slab: remove unused slab_early_init
2022-12-17 11:30 [PATCH] mm/slab: remove unused slab_early_init gouhao
@ 2022-12-18 2:06 ` Hyeonggon Yoo
2022-12-18 12:12 ` gouhao
0 siblings, 1 reply; 3+ messages in thread
From: Hyeonggon Yoo @ 2022-12-18 2:06 UTC (permalink / raw)
To: gouhao
Cc: cl, penberg, rientjes, iamjoonsoo.kim, akpm, vbabka,
roman.gushchin, keescook, linux-mm, linux-kernel,
linux-hardening, mingo, gouhaojake
On Sat, Dec 17, 2022 at 07:30:45PM +0800, gouhao@uniontech.com wrote:
> From: Gou Hao <gouhao@uniontech.com>
>
> 'slab_early_init' was introduced by 'commit e0a42726794f
> ("[PATCH] mm/slab.c: fix early init assumption")', this
> flag was used to prevented off-slab caches being created
s/prevented/prevent
> so early during bootup.
>
> The only user of 'slab_early_init' was removed in commit
> '3217fd9bdf00 ("mm/slab: make criteria for off slab
> determination robust and simple")'.
>
> Signed-off-by: Gou Hao <gouhao@uniontech.com>
> ---
> mm/slab.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/mm/slab.c b/mm/slab.c
> index 7a269db050ee..ede1f29fd81c 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -220,7 +220,6 @@ static inline void fixup_objfreelist_debug(struct kmem_cache *cachep,
> static inline void fixup_slab_list(struct kmem_cache *cachep,
> struct kmem_cache_node *n, struct slab *slab,
> void **list);
> -static int slab_early_init = 1;
>
> #define INDEX_NODE kmalloc_index(sizeof(struct kmem_cache_node))
>
> @@ -1249,8 +1248,6 @@ void __init kmem_cache_init(void)
> slab_state = PARTIAL_NODE;
> setup_kmalloc_cache_index_table();
>
> - slab_early_init = 0;
> -
> /* 5) Replace the bootstrap kmem_cache_node */
> {
> int nid;
> --
> 2.20.1
Nice cleanup, thanks!
Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
--
Thanks,
Hyeonggon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/slab: remove unused slab_early_init
2022-12-18 2:06 ` Hyeonggon Yoo
@ 2022-12-18 12:12 ` gouhao
0 siblings, 0 replies; 3+ messages in thread
From: gouhao @ 2022-12-18 12:12 UTC (permalink / raw)
To: 42.hyeyoo
Cc: akpm, cl, gouhao, gouhaojake, iamjoonsoo.kim, keescook,
linux-hardening, linux-kernel, linux-mm, mingo, penberg,
rientjes, roman.gushchin, vbabka
Thanks for your review, i will fix it in next version patch. :)
Thanks,
Gou Hao
>
> > so early during bootup.
> >
> > The only user of 'slab_early_init' was removed in commit
> > '3217fd9bdf00 ("mm/slab: make criteria for off slab
> > determination robust and simple")'.
> >
> > Signed-off-by: Gou Hao <gouhao@uniontech.com>
> > ---
> > mm/slab.c | 3 ---
> > 1 file changed, 3 deletions(-)
> >
> > diff --git a/mm/slab.c b/mm/slab.c
> > index 7a269db050ee..ede1f29fd81c 100644
> > --- a/mm/slab.c
> > +++ b/mm/slab.c
> > @@ -220,7 +220,6 @@ static inline void fixup_objfreelist_debug(struct kmem_cache *cachep,
> > static inline void fixup_slab_list(struct kmem_cache *cachep,
> > struct kmem_cache_node *n, struct slab *slab,
> > void **list);
> > -static int slab_early_init = 1;
> >
> > #define INDEX_NODE kmalloc_index(sizeof(struct kmem_cache_node))
> >
> > @@ -1249,8 +1248,6 @@ void __init kmem_cache_init(void)
> > slab_state = PARTIAL_NODE;
> > setup_kmalloc_cache_index_table();
> >
> > - slab_early_init = 0;
> > -
> > /* 5) Replace the bootstrap kmem_cache_node */
> > {
> > int nid;
> > --
> > 2.20.1
>
> Nice cleanup, thanks!
>
> Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-18 12:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-17 11:30 [PATCH] mm/slab: remove unused slab_early_init gouhao
2022-12-18 2:06 ` Hyeonggon Yoo
2022-12-18 12:12 ` gouhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).