Message ID | 20220310140701.87908-1-sxwjean@me.com (mailing list archive) |
---|---|
Headers | show |
Series | Cleanups for slab | expand |
> From: Xiongwei Song <sxwjean@gmail.com> > > The parameter @s is useless for alloc_slab_page(). It was added in 2014 > by commit 5dfb41750992 ("sl[au]b: charge slabs to kmemcg explicitly"). The > need for it was removed in 2020 by commit 1f3147b49d75 ("mm: slub: call > account_slab_page() after slab page initialization"). Let's delete it. > > [willy@infradead.org: Added detailed history of @s] > Signed-off-by: Xiongwei Song <sxwjean@gmail.com> > Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> > Acked-by: David Rientjes <rientjes@google.com> > Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev> > --- > mm/slub.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/mm/slub.c b/mm/slub.c > index 261474092e43..5d273ee04c43 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -1788,8 +1788,8 @@ static void *setup_object(struct kmem_cache *s, struct slab *slab, > /* > * Slab allocation and freeing > */ > -static inline struct slab *alloc_slab_page(struct kmem_cache *s, > - gfp_t flags, int node, struct kmem_cache_order_objects oo) > +static inline struct slab *alloc_slab_page(gfp_t flags, int node, > + struct kmem_cache_order_objects oo) > { > struct folio *folio; > struct slab *slab; > @@ -1941,7 +1941,7 @@ static struct slab *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) > if ((alloc_gfp & __GFP_DIRECT_RECLAIM) && oo_order(oo) > oo_order(s->min)) > alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~(__GFP_RECLAIM|__GFP_NOFAIL); > >- slab = alloc_slab_page(s, alloc_gfp, node, oo); >+ slab = alloc_slab_page(alloc_gfp, node, oo); > if (unlikely(!slab)) { > oo = s->min; > alloc_gfp = flags; >@@ -1949,7 +1949,7 @@ static struct slab *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) > * Allocation may have failed due to fragmentation. > * Try a lower order alloc if possible > */ >- slab = alloc_slab_page(s, alloc_gfp, node, oo); >+ slab = alloc_slab_page(alloc_gfp, node, oo); > if (unlikely(!slab)) > goto out; > stat(s, ORDER_FALLBACK); Looks good, nice changelog! Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
On 3/10/22 15:06, sxwjean@me.com wrote: > From: Xiongwei Song <sxwjean@gmail.com> > > 2 cleanups, no functionality changed. Thanks, added to slab for-next > --- > Since v2: > - Add the detailed history of parameter @s of alloc_slab_page(), > message from Matthew Wilcox. > - Collect Reviewed-by and Acked-by. Thanks Matthew Wilcox, David Rientjes > and Roman Gushchin. > > Since v1: > - https://lore.kernel.org/all/20220309145052.219138-1-sxwjean@me.com/ > --- > > Xiongwei Song (2): > mm: slab: Delete unused SLAB_DEACTIVATED flag > mm: slub: Delete useless parameter of alloc_slab_page() > > include/linux/slab.h | 3 --- > mm/slub.c | 8 ++++---- > 2 files changed, 4 insertions(+), 7 deletions(-) >
From: Xiongwei Song <sxwjean@gmail.com> 2 cleanups, no functionality changed. --- Since v2: - Add the detailed history of parameter @s of alloc_slab_page(), message from Matthew Wilcox. - Collect Reviewed-by and Acked-by. Thanks Matthew Wilcox, David Rientjes and Roman Gushchin. Since v1: - https://lore.kernel.org/all/20220309145052.219138-1-sxwjean@me.com/ --- Xiongwei Song (2): mm: slab: Delete unused SLAB_DEACTIVATED flag mm: slub: Delete useless parameter of alloc_slab_page() include/linux/slab.h | 3 --- mm/slub.c | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-)