Skip to content

Commit

Permalink
ceph: mark the cap cache as unreclaimable
Browse files Browse the repository at this point in the history
Releasing cap is affected by many factors (e.g., avail_count/reserve_count/min_count)
and min_count could be specified high volume in client mount option. Hence it's better
to mark cap cache as unreclaimable in case of non-trivial discrepancies between memory
shown as reclaimable and what is actually reclaimed.

Signed-off-by: Chengguang Xu <cgxu519@icloud.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
Chengguang Xu authored and Ilya Dryomov committed Apr 2, 2018
1 parent 7373768 commit bc4b5ad
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/ceph/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,7 @@ static int __init init_caches(void)
if (!ceph_inode_cachep)
return -ENOMEM;

ceph_cap_cachep = KMEM_CACHE(ceph_cap,
SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD);
ceph_cap_cachep = KMEM_CACHE(ceph_cap, SLAB_MEM_SPREAD);
if (!ceph_cap_cachep)
goto bad_cap;
ceph_cap_flush_cachep = KMEM_CACHE(ceph_cap_flush,
Expand Down

0 comments on commit bc4b5ad

Please sign in to comment.