Skip to contentSkip to conversation

fs: amend SLAB_RECLAIM_ACCOUNT on gfs2_quotad_cachep

PATCH In review Huangzhaoyang 2 participants 2 messages Dec 28, 2020 – Jan 4, 2021 GFS2 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: amend SLAB_RECLAIM_ACCOUNT on gfs2_quotad_cachep

From: Zhaoyang Huang <[email protected]>

As gfs2_quotad_cachep has registered the shrinker, amending SLAB_RECLAIM_ACCOUNT when create gfs2_quotad_cachep, which make the slab acount to be presiced.

---
 fs/gfs2/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/main.c +1 -1
index 136484e..db39de9 100644
@@ -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;
 
Signature · 1 line
1.9.1
#1 lore raw

----- Original Message -----

Quoted 25 lines

From: Zhaoyang Huang <[email protected]>

As gfs2_quotad_cachep has registered the shrinker, amending SLAB_RECLAIM_ACCOUNT when create gfs2_quotad_cachep, which make the slab acount to be presiced.

---
 fs/gfs2/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/main.c +1 -2
index 136484e..db39de9 100644
@@ -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;
 
--
Quoted 3 lines

1.9.1

Hi,

Thanks for the patch.
We should also do this for gfs2_glock_cachep. Can you add that to your patch?

Regards,

Bob Peterson