mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zyan@redhat.com>
To: Nikolay Borisov <n.borisov.lkml@gmail.com>
Cc: Sage Weil <sage@redhat.com>, Ilya Dryomov <idryomov@gmail.com>,
	Ceph Development <ceph-devel@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ceph: Mark the file cache as unreclaimable
Date: Tue, 26 Jul 2016 10:24:23 +0800	[thread overview]
Message-ID: <0AB9E085-6301-4015-8B99-64EEA425E652@redhat.com> (raw)
In-Reply-To: <1469466733-9092-1-git-send-email-n.borisov.lkml@gmail.com>


> On Jul 26, 2016, at 01:12, Nikolay Borisov <n.borisov.lkml@gmail.com> wrote:
> 
> Ceph creates multiple caches with the SLAB_RECLAIMABLE flag set, so
> that it can satisfy its internal needs. Inspecting the code shows that
> most of the caches are indeed reclaimable since they are directly
> related to the generic inode/dentry shrinkers. However, one of the
> cache used to satisfy struct file is not reclaimable since its
> entries are freed only when the last reference to the file is
> dropped. If a heavily loaded node opens a lot of files it can
> introduce non-trivial discrepancies between memory shown as reclaimable
> and what is actually reclaimed when drop_caches is used.
> 
> Fix this by removing the reclaimable flag for the file's cache.
> 
> Signed-off-by: Nikolay Borisov <n.borisov.lkml@gmail.com>
> ---
> 
> Fixed checkpatch warning + missing SOB line
> 
> fs/ceph/super.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ceph/super.c b/fs/ceph/super.c
> index 91e02481ce06..8697cac6add0 100644
> --- a/fs/ceph/super.c
> +++ b/fs/ceph/super.c
> @@ -672,8 +672,8 @@ static int __init init_caches(void)
> 	if (ceph_dentry_cachep == NULL)
> 		goto bad_dentry;
> 
> -	ceph_file_cachep = KMEM_CACHE(ceph_file_info,
> -				      SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD);
> +	ceph_file_cachep = KMEM_CACHE(ceph_file_info, SLAB_MEM_SPREAD);
> +
> 	if (ceph_file_cachep == NULL)
> 		goto bad_file;
> 

Applied, thanks

Yan, Zheng

> -- 
> 2.7.4
> 

      reply	other threads:[~2016-07-26  2:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-25 17:09 [PATCH] " Nikolay Borisov
2016-07-25 17:12 ` [PATCH v2] " Nikolay Borisov
2016-07-26  2:24   ` Yan, Zheng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0AB9E085-6301-4015-8B99-64EEA425E652@redhat.com \
    --to=zyan@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=n.borisov.lkml@gmail.com \
    --cc=sage@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®