linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] f2fs: replace __get_victim by dirty_segments in FG_GC
@ 2017-02-17  9:16 Yunlei He
  2017-02-17  9:16 ` [PATCH 2/2] f2fs: remove unnecessary wait in write_begin Yunlei He
  2017-02-17 19:15 ` [PATCH 1/2] f2fs: replace __get_victim by dirty_segments in FG_GC Jaegeuk Kim
  0 siblings, 2 replies; 6+ messages in thread
From: Yunlei He @ 2017-02-17  9:16 UTC (permalink / raw)
  To: jaegeuk, yuchao0, linux-f2fs-devel

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 TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244
142.039494: f2fs_get_victim: dev = (259,30), type = Hot DATA, policy = (Background GC, SSR-mode, Greedy), victim = 19022 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 24
142.070247: new_curseg: Debug: alloc new segment 26746
142.244341: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26054 ofs_unit = 1, pre_victim_secno = 26054, prefree = 0, free = 243
142.254475: do_garbage_collect: Debug: FG_GC, seg_freed = 1
142.293131: f2fs_get_victim: dev = (259,30), type = Warm DATA, policy = (Background GC, SSR-mode, Greedy), victim = 23466 ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 244
142.319001: f2fs_get_victim: dev = (259,30), type = Warm DATA, policy = (Background GC, SSR-mode, Greedy), victim = 23467 ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 244
142.368879: get_victim_by_default: victim 26425 : valid blocks # 3
142.368894: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244
142.378127: f2fs_get_victim: dev = (259,30), type = Hot DATA, policy = (Background GC, SSR-mode, Greedy), victim = 19612 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 24
142.416917: new_curseg: Debug: alloc new segment 26054
142.656794: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 25404 ofs_unit = 1, pre_victim_secno = 25404, prefree = 0, free = 243
142.662139: do_garbage_collect: Debug: FG_GC, seg_freed = 1
142.684159: new_curseg: Debug: alloc new segment 25197
142.685059: get_victim_by_default: victim 26425 : valid blocks # 3
142.685079: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 243
142.701427: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26238 ofs_unit = 1, pre_victim_secno = 26238, prefree = 0, free = 243
142.707105: do_garbage_collect: Debug: FG_GC, seg_freed = 1
142.802444: f2fs_get_victim: dev = (259,30), type = Warm DATA, policy = (Background GC, SSR-mode, Greedy), victim = 23473 ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 244
142.804422: get_victim_by_default: victim 26425 : valid blocks # 3
142.804443: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244
142.851567: f2fs_get_victim: dev = (259,30), type = Hot DATA, policy = (Background GC, SSR-mode, Greedy), victim = 19092 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 24
142.865014: new_curseg: Debug: alloc new segment 26238
143.082245: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26307 ofs_unit = 1, pre_victim_secno = 26307, prefree = 0, free = 244
143.088252: do_garbage_collect: Debug: FG_GC, seg_freed = 1
143.128307: new_curseg: Debug: alloc new segment 25404
143.181846: get_victim_by_default: victim 26425 : valid blocks # 3
143.181872: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244

Signed-off-by: Yunlei He <heyunlei@huawei.com>
---
 fs/f2fs/gc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 88e5e7b..74e1553 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -943,12 +943,10 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync, bool background)
 		 * enough free sections, we should flush dent/node blocks and do
 		 * garbage collections.
 		 */
-		if (__get_victim(sbi, &segno, gc_type) ||
-						prefree_segments(sbi)) {
+		if (dirty_segments(sbi) || prefree_segments(sbi)) {
 			ret = write_checkpoint(sbi, &cpc);
 			if (ret)
 				goto stop;
-			segno = NULL_SEGNO;
 		} else if (has_not_enough_free_secs(sbi, 0, 0)) {
 			ret = write_checkpoint(sbi, &cpc);
 			if (ret)
@@ -959,7 +957,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync, bool background)
 		goto stop;
 	}
 
-	if (segno == NULL_SEGNO && !__get_victim(sbi, &segno, gc_type))
+	if (!__get_victim(sbi, &segno, gc_type))
 		goto stop;
 	ret = 0;
 
-- 
2.10.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] f2fs: remove unnecessary wait in write_begin
  2017-02-17  9:16 [PATCH 1/2] f2fs: replace __get_victim by dirty_segments in FG_GC Yunlei He
@ 2017-02-17  9:16 ` Yunlei He
  2017-02-17 18:21   ` Jaegeuk Kim
  2017-02-17 19:15 ` [PATCH 1/2] f2fs: replace __get_victim by dirty_segments in FG_GC Jaegeuk Kim
  1 sibling, 1 reply; 6+ messages in thread
From: Yunlei He @ 2017-02-17  9:16 UTC (permalink / raw)
  To: jaegeuk, yuchao0, linux-f2fs-devel

It has already waited page stable in grab_cache_page_write_begin,
so we remove this unnecessary wait.

Signed-off-by: Yunlei He <heyunlei@huawei.com>
---
 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/data.c
@@ -1783,8 +1783,6 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping,
 		}
 	}
 
-	f2fs_wait_on_page_writeback(page, DATA, false);
-
 	/* wait for GCed encrypted page writeback */
 	if (f2fs_encrypted_inode(inode) && S_ISREG(inode->i_mode))
 		f2fs_wait_on_encrypted_page_writeback(sbi, blkaddr);
-- 
2.10.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] f2fs: remove unnecessary wait in write_begin
  2017-02-17  9:16 ` [PATCH 2/2] f2fs: remove unnecessary wait in write_begin Yunlei He
@ 2017-02-17 18:21   ` Jaegeuk Kim
  2017-02-23 11:57     ` Chao Yu
  0 siblings, 1 reply; 6+ messages in thread
From: Jaegeuk Kim @ 2017-02-17 18:21 UTC (permalink / raw)
  To: Yunlei He; +Cc: linux-f2fs-devel

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 8baf724c638813ab8d2e9bad99f5b8683e788da3 Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <jaegeuk@kernel.org>
Date: Fri, 17 Feb 2017 09:55:55 -0800
Subject: [PATCH] f2fs: do not wait for writeback in write_begin

Otherwise we can get livelock like below.

[79880.428136] dbench          D    0 18405  18404 0x00000000
[79880.428139] Call Trace:
[79880.428142]  __schedule+0x219/0x6b0
[79880.428144]  schedule+0x36/0x80
[79880.428147]  schedule_timeout+0x243/0x2e0
[79880.428152]  ? update_sd_lb_stats+0x16b/0x5f0
[79880.428155]  ? ktime_get+0x3c/0xb0
[79880.428157]  io_schedule_timeout+0xa6/0x110
[79880.428161]  __lock_page+0xf7/0x130
[79880.428164]  ? unlock_page+0x30/0x30
[79880.428167]  pagecache_get_page+0x16b/0x250
[79880.428171]  grab_cache_page_write_begin+0x20/0x40
[79880.428182]  f2fs_write_begin+0xa2/0xdb0 [f2fs]
[79880.428192]  ? f2fs_mark_inode_dirty_sync+0x16/0x30 [f2fs]
[79880.428197]  ? kmem_cache_free+0x79/0x200
[79880.428203]  ? __mark_inode_dirty+0x17f/0x360
[79880.428206]  generic_perform_write+0xbb/0x190
[79880.428213]  ? file_update_time+0xa4/0xf0
[79880.428217]  __generic_file_write_iter+0x19b/0x1e0
[79880.428226]  f2fs_file_write_iter+0x9c/0x180 [f2fs]
[79880.428231]  __vfs_write+0xc5/0x140
[79880.428235]  vfs_write+0xb2/0x1b0
[79880.428238]  SyS_write+0x46/0xa0
[79880.428242]  entry_SYSCALL_64_fastpath+0x1e/0xad

Fixes: cae96a5c8ab6 ("f2fs: check io submission more precisely")
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/data.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 8c61fa7fd27d..5f3bc98a387d 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1759,7 +1759,12 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping,
 			goto fail;
 	}
 repeat:
-	page = grab_cache_page_write_begin(mapping, index, flags);
+	/*
+	 * Do not use grab_cache_page_write_begin() to avoid deadlock due to
+	 * wait_for_stable_page. Will wait that below with our IO control.
+	 */
+	page = pagecache_get_page(mapping, index,
+				FGP_LOCK | FGP_WRITE | FGP_CREAT, GFP_NOFS);
 	if (!page) {
 		err = -ENOMEM;
 		goto fail;
-- 
2.11.0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] f2fs: replace __get_victim by dirty_segments in FG_GC
  2017-02-17  9:16 [PATCH 1/2] f2fs: replace __get_victim by dirty_segments in FG_GC Yunlei He
  2017-02-17  9:16 ` [PATCH 2/2] f2fs: remove unnecessary wait in write_begin Yunlei He
@ 2017-02-17 19:15 ` Jaegeuk Kim
  2017-02-23 11:59   ` Chao Yu
  1 sibling, 1 reply; 6+ messages in thread
From: Jaegeuk Kim @ 2017-02-17 19:15 UTC (permalink / raw)
  To: Yunlei He; +Cc: linux-f2fs-devel

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 blocks # 3
> 142.037567: get_victim_by_default: victim 26425 : valid blocks # 3
> 142.037585: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244
> 142.039494: f2fs_get_victim: dev = (259,30), type = Hot DATA, policy = (Background GC, SSR-mode, Greedy), victim = 19022 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 24
> 142.070247: new_curseg: Debug: alloc new segment 26746
> 142.244341: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26054 ofs_unit = 1, pre_victim_secno = 26054, prefree = 0, free = 243
> 142.254475: do_garbage_collect: Debug: FG_GC, seg_freed = 1
> 142.293131: f2fs_get_victim: dev = (259,30), type = Warm DATA, policy = (Background GC, SSR-mode, Greedy), victim = 23466 ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 244
> 142.319001: f2fs_get_victim: dev = (259,30), type = Warm DATA, policy = (Background GC, SSR-mode, Greedy), victim = 23467 ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 244
> 142.368879: get_victim_by_default: victim 26425 : valid blocks # 3
> 142.368894: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244
> 142.378127: f2fs_get_victim: dev = (259,30), type = Hot DATA, policy = (Background GC, SSR-mode, Greedy), victim = 19612 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 24
> 142.416917: new_curseg: Debug: alloc new segment 26054
> 142.656794: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 25404 ofs_unit = 1, pre_victim_secno = 25404, prefree = 0, free = 243
> 142.662139: do_garbage_collect: Debug: FG_GC, seg_freed = 1
> 142.684159: new_curseg: Debug: alloc new segment 25197
> 142.685059: get_victim_by_default: victim 26425 : valid blocks # 3
> 142.685079: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 243
> 142.701427: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26238 ofs_unit = 1, pre_victim_secno = 26238, prefree = 0, free = 243
> 142.707105: do_garbage_collect: Debug: FG_GC, seg_freed = 1
> 142.802444: f2fs_get_victim: dev = (259,30), type = Warm DATA, policy = (Background GC, SSR-mode, Greedy), victim = 23473 ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 244
> 142.804422: get_victim_by_default: victim 26425 : valid blocks # 3
> 142.804443: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244
> 142.851567: f2fs_get_victim: dev = (259,30), type = Hot DATA, policy = (Background GC, SSR-mode, Greedy), victim = 19092 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 24
> 142.865014: new_curseg: Debug: alloc new segment 26238
> 143.082245: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26307 ofs_unit = 1, pre_victim_secno = 26307, prefree = 0, free = 244
> 143.088252: do_garbage_collect: Debug: FG_GC, seg_freed = 1
> 143.128307: new_curseg: Debug: alloc new segment 25404
> 143.181846: get_victim_by_default: victim 26425 : valid blocks # 3
> 143.181872: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244
> 
> Signed-off-by: Yunlei He <heyunlei@huawei.com>
> ---
>  fs/f2fs/gc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index 88e5e7b..74e1553 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -943,12 +943,10 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync, bool background)
>  		 * enough free sections, we should flush dent/node blocks and do
>  		 * garbage collections.
>  		 */
> -		if (__get_victim(sbi, &segno, gc_type) ||
> -						prefree_segments(sbi)) {
> +		if (dirty_segments(sbi) || prefree_segments(sbi)) {
>  			ret = write_checkpoint(sbi, &cpc);
>  			if (ret)
>  				goto stop;
> -			segno = NULL_SEGNO;
>  		} else if (has_not_enough_free_secs(sbi, 0, 0)) {
>  			ret = write_checkpoint(sbi, &cpc);
>  			if (ret)
> @@ -959,7 +957,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync, bool background)
>  		goto stop;
>  	}
>  
> -	if (segno == NULL_SEGNO && !__get_victim(sbi, &segno, gc_type))
> +	if (!__get_victim(sbi, &segno, gc_type))
>  		goto stop;
>  	ret = 0;
>  
> -- 
> 2.10.1

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] f2fs: remove unnecessary wait in write_begin
  2017-02-17 18:21   ` Jaegeuk Kim
@ 2017-02-23 11:57     ` Chao Yu
  0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2017-02-23 11:57 UTC (permalink / raw)
  To: Jaegeuk Kim, Yunlei He; +Cc: linux-f2fs-devel

On 2017/2/18 2:21, Jaegeuk Kim wrote:
> 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 8baf724c638813ab8d2e9bad99f5b8683e788da3 Mon Sep 17 00:00:00 2001
> From: Jaegeuk Kim <jaegeuk@kernel.org>
> Date: Fri, 17 Feb 2017 09:55:55 -0800
> Subject: [PATCH] f2fs: do not wait for writeback in write_begin
> 
> Otherwise we can get livelock like below.
> 
> [79880.428136] dbench          D    0 18405  18404 0x00000000
> [79880.428139] Call Trace:
> [79880.428142]  __schedule+0x219/0x6b0
> [79880.428144]  schedule+0x36/0x80
> [79880.428147]  schedule_timeout+0x243/0x2e0
> [79880.428152]  ? update_sd_lb_stats+0x16b/0x5f0
> [79880.428155]  ? ktime_get+0x3c/0xb0
> [79880.428157]  io_schedule_timeout+0xa6/0x110
> [79880.428161]  __lock_page+0xf7/0x130
> [79880.428164]  ? unlock_page+0x30/0x30
> [79880.428167]  pagecache_get_page+0x16b/0x250
> [79880.428171]  grab_cache_page_write_begin+0x20/0x40
> [79880.428182]  f2fs_write_begin+0xa2/0xdb0 [f2fs]
> [79880.428192]  ? f2fs_mark_inode_dirty_sync+0x16/0x30 [f2fs]
> [79880.428197]  ? kmem_cache_free+0x79/0x200
> [79880.428203]  ? __mark_inode_dirty+0x17f/0x360
> [79880.428206]  generic_perform_write+0xbb/0x190
> [79880.428213]  ? file_update_time+0xa4/0xf0
> [79880.428217]  __generic_file_write_iter+0x19b/0x1e0
> [79880.428226]  f2fs_file_write_iter+0x9c/0x180 [f2fs]
> [79880.428231]  __vfs_write+0xc5/0x140
> [79880.428235]  vfs_write+0xb2/0x1b0
> [79880.428238]  SyS_write+0x46/0xa0
> [79880.428242]  entry_SYSCALL_64_fastpath+0x1e/0xad
> 
> Fixes: cae96a5c8ab6 ("f2fs: check io submission more precisely")
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <yuchao0@huawei.com>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] f2fs: replace __get_victim by dirty_segments in FG_GC
  2017-02-17 19:15 ` [PATCH 1/2] f2fs: replace __get_victim by dirty_segments in FG_GC Jaegeuk Kim
@ 2017-02-23 11:59   ` Chao Yu
  0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2017-02-23 11:59 UTC (permalink / raw)
  To: Jaegeuk Kim, Yunlei He; +Cc: linux-f2fs-devel

On 2017/2/18 3:15, Jaegeuk Kim wrote:
> 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 blocks # 3
>> 142.037567: get_victim_by_default: victim 26425 : valid blocks # 3
>> 142.037585: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244
>> 142.039494: f2fs_get_victim: dev = (259,30), type = Hot DATA, policy = (Background GC, SSR-mode, Greedy), victim = 19022 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 24
>> 142.070247: new_curseg: Debug: alloc new segment 26746
>> 142.244341: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26054 ofs_unit = 1, pre_victim_secno = 26054, prefree = 0, free = 243
>> 142.254475: do_garbage_collect: Debug: FG_GC, seg_freed = 1
>> 142.293131: f2fs_get_victim: dev = (259,30), type = Warm DATA, policy = (Background GC, SSR-mode, Greedy), victim = 23466 ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 244
>> 142.319001: f2fs_get_victim: dev = (259,30), type = Warm DATA, policy = (Background GC, SSR-mode, Greedy), victim = 23467 ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 244
>> 142.368879: get_victim_by_default: victim 26425 : valid blocks # 3
>> 142.368894: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244
>> 142.378127: f2fs_get_victim: dev = (259,30), type = Hot DATA, policy = (Background GC, SSR-mode, Greedy), victim = 19612 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 24
>> 142.416917: new_curseg: Debug: alloc new segment 26054
>> 142.656794: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 25404 ofs_unit = 1, pre_victim_secno = 25404, prefree = 0, free = 243
>> 142.662139: do_garbage_collect: Debug: FG_GC, seg_freed = 1
>> 142.684159: new_curseg: Debug: alloc new segment 25197
>> 142.685059: get_victim_by_default: victim 26425 : valid blocks # 3
>> 142.685079: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 243
>> 142.701427: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26238 ofs_unit = 1, pre_victim_secno = 26238, prefree = 0, free = 243
>> 142.707105: do_garbage_collect: Debug: FG_GC, seg_freed = 1
>> 142.802444: f2fs_get_victim: dev = (259,30), type = Warm DATA, policy = (Background GC, SSR-mode, Greedy), victim = 23473 ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 244
>> 142.804422: get_victim_by_default: victim 26425 : valid blocks # 3
>> 142.804443: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244
>> 142.851567: f2fs_get_victim: dev = (259,30), type = Hot DATA, policy = (Background GC, SSR-mode, Greedy), victim = 19092 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 24
>> 142.865014: new_curseg: Debug: alloc new segment 26238
>> 143.082245: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26307 ofs_unit = 1, pre_victim_secno = 26307, prefree = 0, free = 244
>> 143.088252: do_garbage_collect: Debug: FG_GC, seg_freed = 1
>> 143.128307: new_curseg: Debug: alloc new segment 25404
>> 143.181846: get_victim_by_default: victim 26425 : valid blocks # 3
>> 143.181872: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244
>>
>> Signed-off-by: Yunlei He <heyunlei@huawei.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-02-23 11:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-17  9:16 [PATCH 1/2] f2fs: replace __get_victim by dirty_segments in FG_GC Yunlei He
2017-02-17  9:16 ` [PATCH 2/2] f2fs: remove unnecessary wait in write_begin Yunlei He
2017-02-17 18:21   ` Jaegeuk Kim
2017-02-23 11:57     ` Chao Yu
2017-02-17 19:15 ` [PATCH 1/2] f2fs: replace __get_victim by dirty_segments in FG_GC Jaegeuk Kim
2017-02-23 11:59   ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).