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(-) -- 2.25.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel