mbox series

[f2fs-dev,0/3] f2fs-tools: cache free segments count to improve perfmance

Message ID cover.1694768423.git.bo.wu@vivo.com (mailing list archive)
Headers show
Series f2fs-tools: cache free segments count to improve perfmance | expand

Message

Wu Bo Sept. 15, 2023, 9:04 a.m. UTC
When I looking at the performance of resize via flame graph, I can see that
'find_next_free_block()->get_free_segments()' cosume most user space time.

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.

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   | 28 +++++++++++++---------------
 fsck/segment.c |  2 ++
 3 files changed, 16 insertions(+), 15 deletions(-)