* [PATCH v2] fs: amend SLAB_RECLAIM_ACCOUNT on gfs2 related slab cache
@ 2021-01-05 0:47 ` Huangzhaoyang
0 siblings, 0 replies; 6+ messages in thread
From: Huangzhaoyang @ 2021-01-05 0:47 UTC (permalink / raw)
To: Bob Peterson, Andreas Gruenbacher, cluster-devel, Zhaoyang Huang,
linux-kernel
From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
As gfs2_quotad_cachep and gfs2_glock_cachep have registered
the shrinker, amending SLAB_RECLAIM_ACCOUNT when creating
them, which make the slab acount to be presiced.
Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
---
v2: add gfs2_glock_cachep for same operation
---
---
fs/gfs2/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c
index 136484e..23144a7 100644
--- a/fs/gfs2/main.c
+++ b/fs/gfs2/main.c
@@ -100,7 +100,7 @@ static int __init init_gfs2_fs(void)
error = -ENOMEM;
gfs2_glock_cachep = kmem_cache_create("gfs2_glock",
sizeof(struct gfs2_glock),
- 0, 0,
+ 0, SLAB_RECLAIM_ACCOUNT,
gfs2_init_glock_once);
if (!gfs2_glock_cachep)
goto fail_cachep1;
@@ -136,7 +136,7 @@ static int __init init_gfs2_fs(void)
gfs2_quotad_cachep = kmem_cache_create("gfs2_quotad",
sizeof(struct gfs2_quota_data),
- 0, 0, NULL);
+ 0, SLAB_RECLAIM_ACCOUNT, NULL);
if (!gfs2_quotad_cachep)
goto fail_cachep6;
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Cluster-devel] [PATCH v2] fs: amend SLAB_RECLAIM_ACCOUNT on gfs2 related slab cache
@ 2021-01-05 0:47 ` Huangzhaoyang
0 siblings, 0 replies; 6+ messages in thread
From: Huangzhaoyang @ 2021-01-05 0:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
As gfs2_quotad_cachep and gfs2_glock_cachep have registered
the shrinker, amending SLAB_RECLAIM_ACCOUNT when creating
them, which make the slab acount to be presiced.
Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
---
v2: add gfs2_glock_cachep for same operation
---
---
fs/gfs2/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c
index 136484e..23144a7 100644
--- a/fs/gfs2/main.c
+++ b/fs/gfs2/main.c
@@ -100,7 +100,7 @@ static int __init init_gfs2_fs(void)
error = -ENOMEM;
gfs2_glock_cachep = kmem_cache_create("gfs2_glock",
sizeof(struct gfs2_glock),
- 0, 0,
+ 0, SLAB_RECLAIM_ACCOUNT,
gfs2_init_glock_once);
if (!gfs2_glock_cachep)
goto fail_cachep1;
@@ -136,7 +136,7 @@ static int __init init_gfs2_fs(void)
gfs2_quotad_cachep = kmem_cache_create("gfs2_quotad",
sizeof(struct gfs2_quota_data),
- 0, 0, NULL);
+ 0, SLAB_RECLAIM_ACCOUNT, NULL);
if (!gfs2_quotad_cachep)
goto fail_cachep6;
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] fs: amend SLAB_RECLAIM_ACCOUNT on gfs2 related slab cache
2021-01-05 0:47 ` [Cluster-devel] " Huangzhaoyang
@ 2021-01-05 12:54 ` Bob Peterson
-1 siblings, 0 replies; 6+ messages in thread
From: Bob Peterson @ 2021-01-05 12:54 UTC (permalink / raw)
To: Huangzhaoyang
Cc: Andreas Gruenbacher, cluster-devel, Zhaoyang Huang, linux-kernel
----- Original Message -----
> From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
>
> As gfs2_quotad_cachep and gfs2_glock_cachep have registered
> the shrinker, amending SLAB_RECLAIM_ACCOUNT when creating
> them, which make the slab acount to be presiced.
>
> Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
> ---
> v2: add gfs2_glock_cachep for same operation
> ---
Hi,
Thanks. Your patch is now pushed to the linux-gfs2/for-next branch.
I cleaned up the description a bit. For example, I changed "fs:" to
"gfs2:" to conform to other gfs2 patches.
Regards,
Bob Peterson
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Cluster-devel] [PATCH v2] fs: amend SLAB_RECLAIM_ACCOUNT on gfs2 related slab cache
@ 2021-01-05 12:54 ` Bob Peterson
0 siblings, 0 replies; 6+ messages in thread
From: Bob Peterson @ 2021-01-05 12:54 UTC (permalink / raw)
To: cluster-devel.redhat.com
----- Original Message -----
> From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
>
> As gfs2_quotad_cachep and gfs2_glock_cachep have registered
> the shrinker, amending SLAB_RECLAIM_ACCOUNT when creating
> them, which make the slab acount to be presiced.
>
> Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
> ---
> v2: add gfs2_glock_cachep for same operation
> ---
Hi,
Thanks. Your patch is now pushed to the linux-gfs2/for-next branch.
I cleaned up the description a bit. For example, I changed "fs:" to
"gfs2:" to conform to other gfs2 patches.
Regards,
Bob Peterson
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] fs: amend SLAB_RECLAIM_ACCOUNT on gfs2 related slab cache
2021-01-05 12:54 ` [Cluster-devel] " Bob Peterson
@ 2021-01-05 21:07 ` Andreas Grünbacher
-1 siblings, 0 replies; 6+ messages in thread
From: Andreas Grünbacher @ 2021-01-05 21:07 UTC (permalink / raw)
To: Bob Peterson
Cc: Huangzhaoyang, Andreas Gruenbacher, cluster-devel,
Zhaoyang Huang, Linux Kernel Mailing List
Bob,
Am Di., 5. Jan. 2021 um 14:28 Uhr schrieb Bob Peterson <rpeterso@redhat.com>:
> ----- Original Message -----
> > From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
> >
> > As gfs2_quotad_cachep and gfs2_glock_cachep have registered
> > the shrinker, amending SLAB_RECLAIM_ACCOUNT when creating
> > them, which make the slab acount to be presiced.
> >
> > Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
> > ---
> > v2: add gfs2_glock_cachep for same operation
> > ---
> Hi,
>
> Thanks. Your patch is now pushed to the linux-gfs2/for-next branch.
> I cleaned up the description a bit. For example, I changed "fs:" to
> "gfs2:" to conform to other gfs2 patches.
so the patch description now reads:
"As gfs2_quotad_cachep and gfs2_glock_cachep have registered
shrinkers, amending SLAB_RECLAIM_ACCOUNT when creating them,
which improves slab accounting."
I'm not sure what that description is based on; the definition of
SLAB_RECLAIM_ACCOUNT in include/linux/slab.h looks as follows, which
indicates that the purpose isn't really accounting but object
grouping:
/* The following flags affect the page allocator grouping pages by mobility */
/* Objects are reclaimable */
#define SLAB_RECLAIM_ACCOUNT ((slab_flags_t __force)0x00020000U)
#define SLAB_TEMPORARY SLAB_RECLAIM_ACCOUNT /* Objects are
short-lived */
Furthermore, would it make sense to use SLAB_RECLAIM_ACCOUNT or
SLAB_TEMPORARY for gfs2_bufdata and gfs2_trans as well?
Thanks,
Andreas
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Cluster-devel] [PATCH v2] fs: amend SLAB_RECLAIM_ACCOUNT on gfs2 related slab cache
@ 2021-01-05 21:07 ` Andreas Grünbacher
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Grünbacher @ 2021-01-05 21:07 UTC (permalink / raw)
To: cluster-devel.redhat.com
Bob,
Am Di., 5. Jan. 2021 um 14:28 Uhr schrieb Bob Peterson <rpeterso@redhat.com>:
> ----- Original Message -----
> > From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
> >
> > As gfs2_quotad_cachep and gfs2_glock_cachep have registered
> > the shrinker, amending SLAB_RECLAIM_ACCOUNT when creating
> > them, which make the slab acount to be presiced.
> >
> > Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
> > ---
> > v2: add gfs2_glock_cachep for same operation
> > ---
> Hi,
>
> Thanks. Your patch is now pushed to the linux-gfs2/for-next branch.
> I cleaned up the description a bit. For example, I changed "fs:" to
> "gfs2:" to conform to other gfs2 patches.
so the patch description now reads:
"As gfs2_quotad_cachep and gfs2_glock_cachep have registered
shrinkers, amending SLAB_RECLAIM_ACCOUNT when creating them,
which improves slab accounting."
I'm not sure what that description is based on; the definition of
SLAB_RECLAIM_ACCOUNT in include/linux/slab.h looks as follows, which
indicates that the purpose isn't really accounting but object
grouping:
/* The following flags affect the page allocator grouping pages by mobility */
/* Objects are reclaimable */
#define SLAB_RECLAIM_ACCOUNT ((slab_flags_t __force)0x00020000U)
#define SLAB_TEMPORARY SLAB_RECLAIM_ACCOUNT /* Objects are
short-lived */
Furthermore, would it make sense to use SLAB_RECLAIM_ACCOUNT or
SLAB_TEMPORARY for gfs2_bufdata and gfs2_trans as well?
Thanks,
Andreas
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-01-05 21:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 0:47 [PATCH v2] fs: amend SLAB_RECLAIM_ACCOUNT on gfs2 related slab cache Huangzhaoyang
2021-01-05 0:47 ` [Cluster-devel] " Huangzhaoyang
2021-01-05 12:54 ` Bob Peterson
2021-01-05 12:54 ` [Cluster-devel] " Bob Peterson
2021-01-05 21:07 ` Andreas Grünbacher
2021-01-05 21:07 ` [Cluster-devel] " Andreas Grünbacher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.