Skip to contentSkip to conversation

f2fs: modify task name prefix

PATCH In review Guowei Du 3 participants 3 messages Jul 18, 2022 – Jul 24, 2022 F2FS file system

lore
Share & tools
lore

Guowei Du

author
#0 lore raw

PATCH 1/1 f2fs: modify task name prefix

From: duguowei <[email protected]>

If there are more than one f2fs sbi, there will be more discard threads. But the comm is too long to show dev minor. So, change the default prefix of thread from "f2fs_discard" to "f2fs_dcd".

Before:

$ ps -e | grep f2fs
1628 ?        00:00:00 f2fs_ckpt-7:10
1629 ?        00:00:00 f2fs_flush-7:10
1630 ?        00:00:00 f2fs_discard-7:
1631 ?        00:00:00 f2fs_gc-7:10
2030 ?        00:00:00 f2fs_ckpt-7:27
2031 ?        00:00:00 f2fs_flush-7:27
2032 ?        00:00:00 f2fs_discard-7:
2033 ?        00:00:00 f2fs_gc-7:27

After:

$ ps -e | grep f2fs
1628 ?        00:00:00 f2fs_ckpt-7:10
1629 ?        00:00:00 f2fs_flush-7:10
1630 ?        00:00:00 f2fs_dcd-7:10
1631 ?        00:00:00 f2fs_gc-7:10
2030 ?        00:00:00 f2fs_ckpt-7:27
2031 ?        00:00:00 f2fs_flush-7:27
2032 ?        00:00:00 f2fs_dcd-7:27
2033 ?        00:00:00 f2fs_gc-7:27
---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/segment.c +1 -1
index 874c1b9c41a2..2eeefcbe62db 100644
@@ -2018,7 +2018,7 @@ int f2fs_start_discard_thread(struct f2fs_sb_info *sbi)
 		return 0;
 
 	dcc->f2fs_issue_discard = kthread_run(issue_discard_thread, sbi,
-				"f2fs_discard-%u:%u", MAJOR(dev), MINOR(dev));
+				"f2fs_dcd-%u:%u", MAJOR(dev), MINOR(dev));
 	if (IS_ERR(dcc->f2fs_issue_discard))
 		err = PTR_ERR(dcc->f2fs_issue_discard);
 
Signature · 1 line
2.36.1
maintainer
#1 lore raw
Quoted 6 lines · Guowei Du

From: duguowei <[email protected]>

If there are more than one f2fs sbi, there will be more discard threads. But the comm is too long to show dev minor. So, change the default prefix of thread from "f2fs_discard" to "f2fs_dcd".

That looks quite unreadable. What about unmap?

Quoted 43 lines

Before:

$ ps -e | grep f2fs
1628 ?        00:00:00 f2fs_ckpt-7:10
1629 ?        00:00:00 f2fs_flush-7:10
1630 ?        00:00:00 f2fs_discard-7:
1631 ?        00:00:00 f2fs_gc-7:10
2030 ?        00:00:00 f2fs_ckpt-7:27
2031 ?        00:00:00 f2fs_flush-7:27
2032 ?        00:00:00 f2fs_discard-7:
2033 ?        00:00:00 f2fs_gc-7:27

After:

$ ps -e | grep f2fs
1628 ?        00:00:00 f2fs_ckpt-7:10
1629 ?        00:00:00 f2fs_flush-7:10
1630 ?        00:00:00 f2fs_dcd-7:10
1631 ?        00:00:00 f2fs_gc-7:10
2030 ?        00:00:00 f2fs_ckpt-7:27
2031 ?        00:00:00 f2fs_flush-7:27
2032 ?        00:00:00 f2fs_dcd-7:27
2033 ?        00:00:00 f2fs_gc-7:27
---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/segment.c +1 -1
index 874c1b9c41a2..2eeefcbe62db 100644
@@ -2018,7 +2018,7 @@ int f2fs_start_discard_thread(struct f2fs_sb_info *sbi)
 		return 0;
 
 	dcc->f2fs_issue_discard = kthread_run(issue_discard_thread, sbi,
-				"f2fs_discard-%u:%u", MAJOR(dev), MINOR(dev));
+				"f2fs_dcd-%u:%u", MAJOR(dev), MINOR(dev));
 	if (IS_ERR(dcc->f2fs_issue_discard))
 		err = PTR_ERR(dcc->f2fs_issue_discard);
 
Signature · 1 line
2.36.1
maintainer
#2 lore raw
Quoted 9 lines · Jaegeuk Kim
Quoted 6 lines · Guowei Du

From: duguowei <[email protected]>

If there are more than one f2fs sbi, there will be more discard threads. But the comm is too long to show dev minor. So, change the default prefix of thread from "f2fs_discard" to "f2fs_dcd".

That looks quite unreadable. What about unmap?

FYI,

With commit d6986ce24fc0 ("kthread: dynamically allocate memory to store kthread's full name"), it has chance to show full name of kthread when it's not in low memory scenario.

Thanks,

Quoted 44 lines
Quoted 44 lines

Before:

$ ps -e | grep f2fs
1628 ?        00:00:00 f2fs_ckpt-7:10
1629 ?        00:00:00 f2fs_flush-7:10
1630 ?        00:00:00 f2fs_discard-7:
1631 ?        00:00:00 f2fs_gc-7:10
2030 ?        00:00:00 f2fs_ckpt-7:27
2031 ?        00:00:00 f2fs_flush-7:27
2032 ?        00:00:00 f2fs_discard-7:
2033 ?        00:00:00 f2fs_gc-7:27

After:

$ ps -e | grep f2fs
1628 ?        00:00:00 f2fs_ckpt-7:10
1629 ?        00:00:00 f2fs_flush-7:10
1630 ?        00:00:00 f2fs_dcd-7:10
1631 ?        00:00:00 f2fs_gc-7:10
2030 ?        00:00:00 f2fs_ckpt-7:27
2031 ?        00:00:00 f2fs_flush-7:27
2032 ?        00:00:00 f2fs_dcd-7:27
2033 ?        00:00:00 f2fs_gc-7:27
---
  fs/f2fs/segment.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/segment.c +1 -1
index 874c1b9c41a2..2eeefcbe62db 100644
@@ -2018,7 +2018,7 @@ int f2fs_start_discard_thread(struct f2fs_sb_info *sbi)
  		return 0;
 
  	dcc->f2fs_issue_discard = kthread_run(issue_discard_thread, sbi,
-				"f2fs_discard-%u:%u", MAJOR(dev), MINOR(dev));
+				"f2fs_dcd-%u:%u", MAJOR(dev), MINOR(dev));
  	if (IS_ERR(dcc->f2fs_issue_discard))
  		err = PTR_ERR(dcc->f2fs_issue_discard);
 
Signature · 1 line
2.36.1