mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <yuchaochina@hotmail.com>
To: "'Jaegeuk Kim'" <jaegeuk@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
	<linux-f2fs-devel@lists.sourceforge.net>
Subject: RE: [f2fs-dev] [PATCH 2/2] f2fs: shrink unreferenced extent_caches first
Date: Thu, 2 Jul 2015 20:39:43 +0800	[thread overview]
Message-ID: <COL402-EAS277B75C19DA375A394DDFCEAB970@phx.gbl> (raw)
In-Reply-To: <1435713946-6910-2-git-send-email-jaegeuk@kernel.org>

> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> Sent: Wednesday, July 01, 2015 9:26 AM
> To: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org;
> linux-f2fs-devel@lists.sourceforge.net; linux-kernel@vger.kernel.org;
> linux-fsdevel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net
> Cc: Jaegeuk Kim; Jaegeuk Kim
> Subject: [f2fs-dev] [PATCH 2/2] f2fs: shrink unreferenced extent_caches first
> 
> If an extent_tree entry has a zero reference count, we can drop it from the
> cache in higher priority rather than currently referencing entries.
> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>  fs/f2fs/data.c | 51 +++++++++++++++++++++++++++++++++++++++++----------
>  1 file changed, 41 insertions(+), 10 deletions(-)
> 
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 8f059e0..a0a0e2b 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -661,21 +661,54 @@ unsigned int f2fs_shrink_extent_tree(struct f2fs_sb_info *sbi, int
> nr_shrink)
>  	struct radix_tree_root *root = &sbi->extent_tree_root;
>  	unsigned int found;
>  	unsigned int node_cnt = 0, tree_cnt = 0;
> +	int remained;
> 
>  	if (!test_opt(sbi, EXTENT_CACHE))
>  		return 0;
> 
> +	if (!down_write_trylock(&sbi->extent_tree_lock))
> +		goto out;
> +
> +	/* 1. remove unreferenced extent tree */

We always release extent node and tree from inode with lowest ino,
why not random ino?

And this step releasing breaks the rule of lru runs.

Some unreferenced file has high hit ratio and some referenced file may
have low hit ratio. Why not release low hit ratio extent tree at first?

Thanks,


  reply	other threads:[~2015-07-02 12:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01  1:25 [PATCH 1/2] f2fs: check the largest extent at look-up time Jaegeuk Kim
2015-07-01  1:25 ` [PATCH 2/2] f2fs: shrink unreferenced extent_caches first Jaegeuk Kim
2015-07-02 12:39   ` Chao Yu [this message]
2015-07-04  6:29     ` [f2fs-dev] " Jaegeuk Kim
2015-07-06 12:25       ` Chao Yu
2015-07-06 22:16         ` Jaegeuk Kim
2015-07-08  9:41           ` Chao Yu
2015-07-10 23:54             ` Jaegeuk Kim
2015-07-11  1:53               ` Chao Yu
2015-07-02 12:38 ` [f2fs-dev] [PATCH 1/2] f2fs: check the largest extent at look-up time Chao Yu

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=COL402-EAS277B75C19DA375A394DDFCEAB970@phx.gbl \
    --to=yuchaochina@hotmail.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®