ceph: mark the cap cache as unreclaimable
authorChengguang Xu <cgxu519@icloud.com>
Tue, 27 Feb 2018 05:49:44 +0000 (13:49 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 2 Apr 2018 08:12:47 +0000 (10:12 +0200)
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>
fs/ceph/super.c

index 52fec209f0a60cd3d61eb247766650f2f2c10298..9bf9e54259dd760df3c91c0991a989a1d67bac55 100644 (file)
@@ -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,