Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1175938 > unrolled thread
| Started by | Chao Yu <yuchaochina@hotmail.com> |
|---|---|
| First post | 2015-07-02 14:40 +0200 |
| Last post | 2015-07-04 08:40 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
RE: [f2fs-dev] [PATCH 12/12] f2fs: use extent_cache by default Chao Yu <yuchaochina@hotmail.com> - 2015-07-02 14:40 +0200
RE: [f2fs-dev] [PATCH 12/12] f2fs: use extent_cache by default Chao Yu <yuchaochina@hotmail.com> - 2015-07-04 08:40 +0200
| From | Chao Yu <yuchaochina@hotmail.com> |
|---|---|
| Date | 2015-07-02 14:40 +0200 |
| Subject | RE: [f2fs-dev] [PATCH 12/12] f2fs: use extent_cache by default |
| Message-ID | <pHLWy-2FP-17@gated-at.bofh.it> |
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? > > 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. [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); [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? Thanks, -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Chao Yu <yuchaochina@hotmail.com> |
|---|---|
| Date | 2015-07-04 08:40 +0200 |
| Message-ID | <pIphg-22U-9@gated-at.bofh.it> |
| In reply to | #1175938 |
Hi Jaegeuk, > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > Sent: Saturday, July 04, 2015 1:16 PM > To: Chao Yu > 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 [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. Previously, I suspected that ->write_inode and ->evict will be executed concurrently. After checking the code, I find that would not happen, so we are safe. Thanks, > > Thanks, > > > > > Thanks, -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web