diff mbox

ceph: mark the cap cache as unreclaimable

Message ID 1519710584-60240-1-git-send-email-cgxu519@icloud.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chengguang Xu Feb. 27, 2018, 5:49 a.m. UTC
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>
---
 fs/ceph/super.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Yan, Zheng March 5, 2018, 2:57 a.m. UTC | #1
> On 27 Feb 2018, at 13:49, Chengguang Xu <cgxu519@icloud.com> wrote:
> 
> 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>
> ---
> fs/ceph/super.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ceph/super.c b/fs/ceph/super.c
> index a62d2a9..3482834 100644
> --- a/fs/ceph/super.c
> +++ b/fs/ceph/super.c
> @@ -696,8 +696,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,
> -- 
> 1.8.3.1
> 

Applied. Thanks

Yan, Zheng

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index a62d2a9..3482834 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -696,8 +696,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,