From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <yuchaochina@hotmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 12/12] f2fs: use extent_cache by default
Date: Fri, 3 Jul 2015 22:16:10 -0700 [thread overview]
Message-ID: <20150704051610.GC15817@jaegeuk-mac02.hsd1.ca.comcast.net> (raw)
In-Reply-To: <COL402-EAS385C99A3E59C61CC6871C57AB970@phx.gbl>
Hi Chao,
On Thu, Jul 02, 2015 at 08:36:16PM +0800, Chao Yu wrote:
> Hi Jaegeuk,
>
> > -----Original Message-----
> > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> > Sent: Tuesday, June 30, 2015 2:40 AM
> > To: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org;
> > linux-f2fs-devel@lists.sourceforge.net
> > Cc: Jaegeuk Kim
> > Subject: [f2fs-dev] [PATCH 12/12] f2fs: use extent_cache by default
> >
> > We don't need to handle the duplicate extent infot showrmation.
>
> information?
Fixed.
>
> >
> > The integrated rule is:
> > - update on-disk extent with largest one tracked by in-memory extent_cache
> > - destroy extent_tree for the truncation case
> > - drop per-inode extent_cache by shrinker
> >
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
>
> [snip]
>
> > @@ -538,7 +427,11 @@ static struct extent_node *__insert_extent_tree(struct f2fs_sb_info *sbi,
> > }
> > }
> >
> > - return __attach_extent_node(sbi, et, ei, parent, p);
> > + en = __attach_extent_node(sbi, et, ei, parent, p);
> > +update_out:
> > + if (en && en->ei.len > et->largest.len)
> > + et->largest = en->ei;
>
> IMO, it's better to update cached_en here if it is invalid in
> __detach_extent_node, then cached_en and largest may point different
> extent info, it can expand our region of first level extent cache.
Agreed.
>
> [snip]
>
> > +
> > + /* free all extent info belong to this extent tree */
> > + f2fs_destroy_extent_node(inode);
>
> How about returning number of freed extent node for tracing.
>
> node_cnt = f2fs_destroy_extent_node(inode);
No problem.
>
> [snip]
>
> > @@ -237,10 +237,11 @@ void update_inode(struct inode *inode, struct page *node_page)
> > ri->i_size = cpu_to_le64(i_size_read(inode));
> > ri->i_blocks = cpu_to_le64(inode->i_blocks);
> >
> > - read_lock(&F2FS_I(inode)->ext_lock);
> > - set_raw_extent(&F2FS_I(inode)->ext, &ri->i_ext);
> > - read_unlock(&F2FS_I(inode)->ext_lock);
> > -
> > + if (F2FS_I(inode)->extent_tree)
>
> Could extent cache destroy after above check?
I don't think so.
The extent_tree is assigned as one way.
Once it is assigned, it will be deallocated only after evict_inode.
Thanks,
>
> Thanks,
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2015-07-04 5:16 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 18:39 [PATCH 01/12] f2fs: avoid freed stat information Jaegeuk Kim
2015-06-29 18:39 ` [PATCH 02/12] f2fs: avoid to use failed inode immediately Jaegeuk Kim
2015-06-30 2:54 ` [f2fs-dev] " Chao Yu
2015-06-29 18:39 ` [PATCH 03/12] f2fs: convert inline_data for various fallocate Jaegeuk Kim
2015-06-30 2:58 ` [f2fs-dev] " Chao Yu
2015-06-29 18:39 ` [PATCH 04/12] f2fs: remove wrong f2fs_bug_on when merging extents Jaegeuk Kim
2015-06-30 3:00 ` [f2fs-dev] " Chao Yu
2015-07-01 1:02 ` Jaegeuk Kim
2015-06-29 18:39 ` [PATCH 05/12] f2fs: fix wrong block address calculation for a split extent Jaegeuk Kim
2015-06-30 3:08 ` [f2fs-dev] " Chao Yu
2015-06-29 18:39 ` [PATCH 06/12] f2fs: update on-disk extents even under extent_cache Jaegeuk Kim
2015-06-30 3:10 ` [f2fs-dev] " Chao Yu
2015-06-29 18:39 ` [PATCH 07/12] f2fs: set cached_en after checking finally Jaegeuk Kim
2015-06-30 3:26 ` [f2fs-dev] " Chao Yu
2015-06-29 18:39 ` [PATCH 08/12] f2fs: introduce a shrinker for mounted fs Jaegeuk Kim
2015-06-30 3:43 ` [f2fs-dev] " Chao Yu
2015-07-01 1:28 ` Jaegeuk Kim
2015-07-02 12:32 ` Chao Yu
2015-07-04 4:51 ` Jaegeuk Kim
2015-06-29 18:39 ` [PATCH 09/12] f2fs: shrink nat_cache entries Jaegeuk Kim
2015-07-02 12:33 ` [f2fs-dev] " Chao Yu
2015-06-29 18:39 ` [PATCH 10/12] f2fs: shrink extent_cache entries Jaegeuk Kim
2015-07-02 12:34 ` [f2fs-dev] " Chao Yu
2015-06-29 18:39 ` [PATCH 11/12] f2fs: add noextent_cache mount option Jaegeuk Kim
2015-07-02 12:35 ` [f2fs-dev] " Chao Yu
2015-07-04 4:57 ` Jaegeuk Kim
2015-06-29 18:39 ` [PATCH 12/12] f2fs: use extent_cache by default Jaegeuk Kim
2015-07-02 12:36 ` [f2fs-dev] " Chao Yu
2015-07-04 5:16 ` Jaegeuk Kim [this message]
2015-07-04 6:30 ` Chao Yu
2015-07-06 12:26 ` Chao Yu
2015-06-30 2:45 ` [f2fs-dev] [PATCH 01/12] f2fs: avoid freed stat information 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=20150704051610.GC15817@jaegeuk-mac02.hsd1.ca.comcast.net \
--to=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchaochina@hotmail.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®