Skip to content

Commit

Permalink
gfs2: amend SLAB_RECLAIM_ACCOUNT on gfs2 related slab cache
Browse files Browse the repository at this point in the history
As gfs2_quotad_cachep and gfs2_glock_cachep have registered
shrinkers, amending SLAB_RECLAIM_ACCOUNT when creating them,
which improves slab accounting.

Signed-off-by: Zhaoyang Huang <[email protected]>
Signed-off-by: Bob Peterson <[email protected]>
Signed-off-by: Andreas Gruenbacher <[email protected]>
  • Loading branch information
Zhaoyang Huang authored and AstralBob committed Jan 22, 2021
1 parent 2a6fe26 commit 00e8e9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/gfs2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,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;
Expand Down Expand Up @@ -134,7 +134,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;

Expand Down

0 comments on commit 00e8e9b

Please sign in to comment.