[f2fs-dev] [PATCH 1/2] f2fs: replace __get_victim by dirty_segments in FG_GC

2017-02-17 Thread Yunlei He
In FG_GC process, it will search victim section twice. This will cause some dirty section with less valid blocks skip garbage collection. section # 26425 : valid blocks # 3 142.037567: get_victim_by_default: victim 26425 : valid blocks # 3 142.037585: f2fs_get_victim: dev = (259,30), type = No TYP

[f2fs-dev] [PATCH 2/2] f2fs: remove unnecessary wait in write_begin

2017-02-17 Thread Yunlei He
It has already waited page stable in grab_cache_page_write_begin, so we remove this unnecessary wait. Signed-off-by: Yunlei He --- fs/f2fs/data.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 8c61fa7..1201949 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/

Re: [f2fs-dev] [PATCH 2/2] f2fs: remove unnecessary wait in write_begin

2017-02-17 Thread Jaegeuk Kim
On 02/17, Yunlei He wrote: > It has already waited page stable in grab_cache_page_write_begin, > so we remove this unnecessary wait. I also got a deadlock in my perf test, and I wrote another patch to resolve it by replacing grab_cache_page_write_begin() with pagecache_get_page(). >From 8baf724c6

[f2fs-dev] [PATCH] f2fs: trace victim's cost selectecd by f2fs_gc

2017-02-17 Thread Jaegeuk Kim
This patch adds min_cost of each victims. Signed-off-by: Jaegeuk Kim --- include/trace/events/f2fs.h | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index 153572e256d6..ff31ccfb8111 100644 --- a/include/trace/e

[f2fs-dev] [PATCH 2/2] f2fs: fix the case when there is no free segment to allocate for CURSEG_WARM_NODE

2017-02-17 Thread Yunlong Song
If the free segments are used up, then new_curseg will fail for CURSEG_WARM_NODE, in this case, we should use change_curseg instead of new_curseg. Signed-off-by: Yunlong Song --- fs/f2fs/segment.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index df

[f2fs-dev] [PATCH 0/2] Reduce the overprovision size a lot in f2fs

2017-02-17 Thread Yunlong Song
Rethink the meaning of reserved segments and overprovision segments in f2fs The key issue is that flash FTL has already made overprovision itself, e.g. 7%, according to the difference between gigabyte (GB) and gibibyte (GiB). And this part can nenver be seen by the upper file system. The device ca

[f2fs-dev] [PATCH 1/2] mkfs.f2fs: add option to set the value of reserved segments and overprovision segments

2017-02-17 Thread Yunlong Song
Signed-off-by: Yunlong Song --- include/f2fs_fs.h | 3 +++ lib/libf2fs.c | 3 +++ mkfs/f2fs_format.c | 21 ++--- mkfs/f2fs_format_main.c | 10 +- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h in

Re: [f2fs-dev] [PATCH 2/2] f2fs: fix the case when there is no free segment to allocate for CURSEG_WARM_NODE

2017-02-17 Thread Jaegeuk Kim
Hi Yunlong, I already started to test this since a couple of days ago. :) http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev-test&id=908b5f463c82eaf972b149a26bb310f5e25064fd Thanks, On 02/17, Yunlong Song wrote: > If the free segments are used up, then new_curseg will fa

Re: [f2fs-dev] [PATCH 1/2] f2fs: replace __get_victim by dirty_segments in FG_GC

2017-02-17 Thread Jaegeuk Kim
Hi Yunlei, I also removed "segno = NULL_SEGNO;" in the beginning part near gc_more. Thanks, On 02/17, Yunlei He wrote: > In FG_GC process, it will search victim section twice. This will > cause some dirty section with less valid blocks skip garbage > collection. > > section # 26425 : valid bloc

Re: [f2fs-dev] [PATCH 0/2] Reduce the overprovision size a lot in f2fs

2017-02-17 Thread Jaegeuk Kim
Hi Yunlong, On 02/17, Yunlong Song wrote: > Rethink the meaning of reserved segments and overprovision segments in f2fs > > The key issue is that flash FTL has already made overprovision itself, e.g. > 7%, > according to the difference between gigabyte (GB) and gibibyte (GiB). And this > part ca

Re: [f2fs-dev] [RFC] add ovp valid_blocks check for bg gc victim to fg_gc

2017-02-17 Thread Jaegeuk Kim
On 02/17, Hou Pengyang wrote: ... > > > On 2017/2/17 7:48, Jaegeuk Kim wrote: > > > > + ovp_count = SM_I(sbi)->ovp_segments << sbi->log_blocks_per_seg; > > > > > > About the ovp_count calculation, > > > > > > in mkfs.f2fs, we get ovp_segment by > > > > > > set_cp(overprov_segment_co

[f2fs-dev] [f2fs:dev-test 59/63] fs/f2fs/dir.c:676:8-15: ERROR: PTR_ERR applied after initialization to constant on line 650

2017-02-17 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test head: d73e9520359023105b87050ee82aa112a357a2fd commit: 9fdd0bb26d924f702fe575f864c30eaa60a1797e [59/63] f2fs: fix multiple f2fs_add_link() calls having same name coccinelle warnings: (new ones prefixed by >>) >