Skip to content

f2fs-tools: cache free segments count to improve perfmance

Wu Bo via Linux-f2fs-devel linux-f2fs-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyIn review
  2. v13 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Fixed some logic issues reviewed by Chao Yu

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3f2fs-tools: use 'IS_CUR_SEGNO()' to check if it is current segmentfsck/mount.c+1 -91 reply
2/3f2fs-tools: skip not matched segment when finding free blockfsck/mount.c+4 -20 replies
3/3f2fs-tools: cache free segments count to improve perfmancefsck/f2fs.h fsck/mount.c fsck/segment.c+10 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [f2fs-dev] [PATCH v2 0/3] f2fs-tools: cache free segments count to improve perfmance

The performance flame graph of resize shows that 'get_free_segments()' consum most user space time:
https://linkthinking.cn/images/resize_flame.jpg

Every calling 'get_free_segments()', it will traverses all segments to calculate the free segments count. And this path is called a lot in resize & sload & defrag.

If the free segments count is cached, these tools performance will be improved.

Changed in v2:
- Fixed some logic issues reviewed by Chao Yu

Wu Bo (3):
f2fs-tools: use 'IS_CUR_SEGNO()' to check if it is current segment
f2fs-tools: skip not matched segment when finding free block
f2fs-tools: cache free segments count to improve perfmance

 fsck/f2fs.h    |  1 +
 fsck/mount.c   | 25 ++++++++++++-------------
 fsck/segment.c |  2 ++
 3 files changed, 15 insertions(+), 13 deletions(-)
Signature · 8 lines
2.25.1



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel