* [PATCH 0/2] Cleanups for slab
@ 2022-03-09 14:50 sxwjean
2022-03-09 14:50 ` [PATCH 1/2] mm: slab: Delete unused SLAB_DEACTIVATED flag sxwjean
2022-03-09 14:50 ` [PATCH 2/2] mm: slub: Delete useless parameter of alloc_slab_page() sxwjean
0 siblings, 2 replies; 11+ messages in thread
From: sxwjean @ 2022-03-09 14:50 UTC (permalink / raw)
To: cl, penberg, rientjes, iamjoonsoo.kim, akpm, vbabka, longman, guro
Cc: linux-mm, linux-kernel, Xiongwei Song
From: Xiongwei Song <sxwjean@gmail.com>
2 cleanups, no functionality changed.
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(-)
--
2.30.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/2] mm: slab: Delete unused SLAB_DEACTIVATED flag
2022-03-09 14:50 [PATCH 0/2] Cleanups for slab sxwjean
@ 2022-03-09 14:50 ` sxwjean
2022-03-09 17:14 ` David Rientjes
2022-03-10 1:49 ` Roman Gushchin
2022-03-09 14:50 ` [PATCH 2/2] mm: slub: Delete useless parameter of alloc_slab_page() sxwjean
1 sibling, 2 replies; 11+ messages in thread
From: sxwjean @ 2022-03-09 14:50 UTC (permalink / raw)
To: cl, penberg, rientjes, iamjoonsoo.kim, akpm, vbabka, longman, guro
Cc: linux-mm, linux-kernel, Xiongwei Song
From: Xiongwei Song <sxwjean@gmail.com>
Since commit 9855609bde03 ("mm: memcg/slab: use a single set of
kmem_caches for all accounted allocations") deletes all SLAB_DEACTIVATED
users, therefore this flag is not needed any more, let's delete it.
Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
---
include/linux/slab.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 37bde99b74af..b6b3eed6c7c4 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -117,9 +117,6 @@
#define SLAB_RECLAIM_ACCOUNT ((slab_flags_t __force)0x00020000U)
#define SLAB_TEMPORARY SLAB_RECLAIM_ACCOUNT /* Objects are short-lived */
-/* Slab deactivation flag */
-#define SLAB_DEACTIVATED ((slab_flags_t __force)0x10000000U)
-
/*
* ZERO_SIZE_PTR will be returned for zero sized kmalloc requests.
*
--
2.30.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/2] mm: slub: Delete useless parameter of alloc_slab_page()
2022-03-09 14:50 [PATCH 0/2] Cleanups for slab sxwjean
2022-03-09 14:50 ` [PATCH 1/2] mm: slab: Delete unused SLAB_DEACTIVATED flag sxwjean
@ 2022-03-09 14:50 ` sxwjean
2022-03-09 15:28 ` Matthew Wilcox
2022-03-10 1:48 ` Roman Gushchin
1 sibling, 2 replies; 11+ messages in thread
From: sxwjean @ 2022-03-09 14:50 UTC (permalink / raw)
To: cl, penberg, rientjes, iamjoonsoo.kim, akpm, vbabka, longman, guro
Cc: linux-mm, linux-kernel, Xiongwei Song
From: Xiongwei Song <sxwjean@gmail.com>
The parameter @s is useless for alloc_slab_page(), let's delete it.
Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
---
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);
--
2.30.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] mm: slub: Delete useless parameter of alloc_slab_page()
2022-03-09 14:50 ` [PATCH 2/2] mm: slub: Delete useless parameter of alloc_slab_page() sxwjean
@ 2022-03-09 15:28 ` Matthew Wilcox
2022-03-09 17:15 ` David Rientjes
2022-03-10 1:17 ` Xiongwei Song
2022-03-10 1:48 ` Roman Gushchin
1 sibling, 2 replies; 11+ messages in thread
From: Matthew Wilcox @ 2022-03-09 15:28 UTC (permalink / raw)
To: sxwjean
Cc: cl, penberg, rientjes, iamjoonsoo.kim, akpm, vbabka, longman,
guro, linux-mm, linux-kernel, Xiongwei Song
On Wed, Mar 09, 2022 at 10:50:52PM +0800, sxwjean@me.com wrote:
> From: Xiongwei Song <sxwjean@gmail.com>
>
> The parameter @s is useless for alloc_slab_page(), let's delete it.
Perhaps we could add a little more information here.
It was added in 2014 by 5dfb41750992 ("sl[au]b: charge slabs to kmemcg
explicitly"). The need for it was removed in 2020 by 1f3147b49d75
("mm: slub: call account_slab_page() after slab page initialization").
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] mm: slab: Delete unused SLAB_DEACTIVATED flag
2022-03-09 14:50 ` [PATCH 1/2] mm: slab: Delete unused SLAB_DEACTIVATED flag sxwjean
@ 2022-03-09 17:14 ` David Rientjes
2022-03-10 1:18 ` Xiongwei Song
2022-03-10 1:49 ` Roman Gushchin
1 sibling, 1 reply; 11+ messages in thread
From: David Rientjes @ 2022-03-09 17:14 UTC (permalink / raw)
To: sxwjean
Cc: cl, penberg, iamjoonsoo.kim, akpm, vbabka, longman, guro,
linux-mm, linux-kernel, Xiongwei Song
On Wed, 9 Mar 2022, sxwjean@me.com wrote:
> From: Xiongwei Song <sxwjean@gmail.com>
>
> Since commit 9855609bde03 ("mm: memcg/slab: use a single set of
> kmem_caches for all accounted allocations") deletes all SLAB_DEACTIVATED
> users, therefore this flag is not needed any more, let's delete it.
>
> Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] mm: slub: Delete useless parameter of alloc_slab_page()
2022-03-09 15:28 ` Matthew Wilcox
@ 2022-03-09 17:15 ` David Rientjes
2022-03-10 1:18 ` Xiongwei Song
2022-03-10 1:17 ` Xiongwei Song
1 sibling, 1 reply; 11+ messages in thread
From: David Rientjes @ 2022-03-09 17:15 UTC (permalink / raw)
To: Matthew Wilcox
Cc: sxwjean, cl, penberg, iamjoonsoo.kim, akpm, vbabka, longman,
guro, linux-mm, linux-kernel, Xiongwei Song
On Wed, 9 Mar 2022, Matthew Wilcox wrote:
> On Wed, Mar 09, 2022 at 10:50:52PM +0800, sxwjean@me.com wrote:
> > From: Xiongwei Song <sxwjean@gmail.com>
> >
> > The parameter @s is useless for alloc_slab_page(), let's delete it.
>
> Perhaps we could add a little more information here.
>
> It was added in 2014 by 5dfb41750992 ("sl[au]b: charge slabs to kmemcg
> explicitly"). The need for it was removed in 2020 by 1f3147b49d75
> ("mm: slub: call account_slab_page() after slab page initialization").
>
> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
>
Acked-by: David Rientjes <rientjes@google.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] mm: slub: Delete useless parameter of alloc_slab_page()
2022-03-09 15:28 ` Matthew Wilcox
2022-03-09 17:15 ` David Rientjes
@ 2022-03-10 1:17 ` Xiongwei Song
1 sibling, 0 replies; 11+ messages in thread
From: Xiongwei Song @ 2022-03-10 1:17 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Xiongwei Song, Christoph Lameter, Pekka Enberg, David Rientjes,
Joonsoo Kim, Andrew Morton, Vlastimil Babka, longman, guro,
linux-mm, Linux Kernel Mailing List
On Wed, Mar 9, 2022 at 11:29 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Wed, Mar 09, 2022 at 10:50:52PM +0800, sxwjean@me.com wrote:
> > From: Xiongwei Song <sxwjean@gmail.com>
> >
> > The parameter @s is useless for alloc_slab_page(), let's delete it.
>
> Perhaps we could add a little more information here.
>
> It was added in 2014 by 5dfb41750992 ("sl[au]b: charge slabs to kmemcg
> explicitly"). The need for it was removed in 2020 by 1f3147b49d75
> ("mm: slub: call account_slab_page() after slab page initialization").
Ok. Will update.
>
> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Thank you.
Regards,
Xiongwei
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] mm: slub: Delete useless parameter of alloc_slab_page()
2022-03-09 17:15 ` David Rientjes
@ 2022-03-10 1:18 ` Xiongwei Song
0 siblings, 0 replies; 11+ messages in thread
From: Xiongwei Song @ 2022-03-10 1:18 UTC (permalink / raw)
To: David Rientjes
Cc: Matthew Wilcox, Xiongwei Song, Christoph Lameter, Pekka Enberg,
Joonsoo Kim, Andrew Morton, Vlastimil Babka, longman, guro,
linux-mm, Linux Kernel Mailing List
On Thu, Mar 10, 2022 at 1:15 AM David Rientjes <rientjes@google.com> wrote:
>
> On Wed, 9 Mar 2022, Matthew Wilcox wrote:
>
> > On Wed, Mar 09, 2022 at 10:50:52PM +0800, sxwjean@me.com wrote:
> > > From: Xiongwei Song <sxwjean@gmail.com>
> > >
> > > The parameter @s is useless for alloc_slab_page(), let's delete it.
> >
> > Perhaps we could add a little more information here.
> >
> > It was added in 2014 by 5dfb41750992 ("sl[au]b: charge slabs to kmemcg
> > explicitly"). The need for it was removed in 2020 by 1f3147b49d75
> > ("mm: slub: call account_slab_page() after slab page initialization").
> >
> > Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> >
>
> Acked-by: David Rientjes <rientjes@google.com>
Thank you!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] mm: slab: Delete unused SLAB_DEACTIVATED flag
2022-03-09 17:14 ` David Rientjes
@ 2022-03-10 1:18 ` Xiongwei Song
0 siblings, 0 replies; 11+ messages in thread
From: Xiongwei Song @ 2022-03-10 1:18 UTC (permalink / raw)
To: David Rientjes
Cc: Xiongwei Song, Christoph Lameter, Pekka Enberg, Joonsoo Kim,
Andrew Morton, Vlastimil Babka, longman, guro, linux-mm,
Linux Kernel Mailing List
On Thu, Mar 10, 2022 at 1:14 AM David Rientjes <rientjes@google.com> wrote:
>
> On Wed, 9 Mar 2022, sxwjean@me.com wrote:
>
> > From: Xiongwei Song <sxwjean@gmail.com>
> >
> > Since commit 9855609bde03 ("mm: memcg/slab: use a single set of
> > kmem_caches for all accounted allocations") deletes all SLAB_DEACTIVATED
> > users, therefore this flag is not needed any more, let's delete it.
> >
> > Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
>
> Acked-by: David Rientjes <rientjes@google.com>
Thank you!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] mm: slub: Delete useless parameter of alloc_slab_page()
2022-03-09 14:50 ` [PATCH 2/2] mm: slub: Delete useless parameter of alloc_slab_page() sxwjean
2022-03-09 15:28 ` Matthew Wilcox
@ 2022-03-10 1:48 ` Roman Gushchin
1 sibling, 0 replies; 11+ messages in thread
From: Roman Gushchin @ 2022-03-10 1:48 UTC (permalink / raw)
To: sxwjean
Cc: cl, penberg, rientjes, iamjoonsoo.kim, akpm, vbabka, longman,
guro, linux-mm, linux-kernel, Xiongwei Song
On Wed, Mar 09, 2022 at 10:50:52PM +0800, sxwjean@me.com wrote:
> From: Xiongwei Song <sxwjean@gmail.com>
>
> The parameter @s is useless for alloc_slab_page(), let's delete it.
>
> Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Thanks!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] mm: slab: Delete unused SLAB_DEACTIVATED flag
2022-03-09 14:50 ` [PATCH 1/2] mm: slab: Delete unused SLAB_DEACTIVATED flag sxwjean
2022-03-09 17:14 ` David Rientjes
@ 2022-03-10 1:49 ` Roman Gushchin
1 sibling, 0 replies; 11+ messages in thread
From: Roman Gushchin @ 2022-03-10 1:49 UTC (permalink / raw)
To: sxwjean
Cc: cl, penberg, rientjes, iamjoonsoo.kim, akpm, vbabka, longman,
guro, linux-mm, linux-kernel, Xiongwei Song
On Wed, Mar 09, 2022 at 10:50:51PM +0800, sxwjean@me.com wrote:
> From: Xiongwei Song <sxwjean@gmail.com>
>
> Since commit 9855609bde03 ("mm: memcg/slab: use a single set of
> kmem_caches for all accounted allocations") deletes all SLAB_DEACTIVATED
> users, therefore this flag is not needed any more, let's delete it.
Indeed! Thank!
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-03-10 1:49 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09 14:50 [PATCH 0/2] Cleanups for slab sxwjean
2022-03-09 14:50 ` [PATCH 1/2] mm: slab: Delete unused SLAB_DEACTIVATED flag sxwjean
2022-03-09 17:14 ` David Rientjes
2022-03-10 1:18 ` Xiongwei Song
2022-03-10 1:49 ` Roman Gushchin
2022-03-09 14:50 ` [PATCH 2/2] mm: slub: Delete useless parameter of alloc_slab_page() sxwjean
2022-03-09 15:28 ` Matthew Wilcox
2022-03-09 17:15 ` David Rientjes
2022-03-10 1:18 ` Xiongwei Song
2022-03-10 1:17 ` Xiongwei Song
2022-03-10 1:48 ` Roman Gushchin
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).