linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 0/3] f2fs-tools: cache free segments count to improve perfmance
@ 2023-09-15  9:04 Wu Bo via Linux-f2fs-devel
  2023-09-15  9:04 ` [f2fs-dev] [PATCH 1/3] f2fs-tools: use 'IS_CUR_SEGNO()' to check if it is current segment Wu Bo via Linux-f2fs-devel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wu Bo via Linux-f2fs-devel @ 2023-09-15  9:04 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu; +Cc: Wu Bo, Wu Bo, linux-f2fs-devel

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

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

end of thread, other threads:[~2023-09-20 13:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-15  9:04 [f2fs-dev] [PATCH 0/3] f2fs-tools: cache free segments count to improve perfmance Wu Bo via Linux-f2fs-devel
2023-09-15  9:04 ` [f2fs-dev] [PATCH 1/3] f2fs-tools: use 'IS_CUR_SEGNO()' to check if it is current segment Wu Bo via Linux-f2fs-devel
2023-09-20  8:49   ` Chao Yu
2023-09-15  9:04 ` [f2fs-dev] [PATCH 2/3] f2fs-tools: skip not matched segment when finding free block Wu Bo via Linux-f2fs-devel
2023-09-20 13:07   ` Chao Yu
2023-09-15  9:04 ` [f2fs-dev] [PATCH 3/3] f2fs-tools: cache free segments count to improve perfmance Wu Bo via Linux-f2fs-devel

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).