From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH v2] f2fs: do not issue small discard commands during checkpoint
Date: Wed, 14 Jun 2023 09:10:58 -0700 [thread overview]
Message-ID: <ZInmkgjDnAUD5Nk0@google.com> (raw)
In-Reply-To: <20230613203947.2745943-1-jaegeuk@kernel.org>
If there're huge # of small discards, this will increase checkpoint latency
insanely. Let's issue small discards only by trim.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
Change log from v1:
- move the skip logic to avoid dangling objects
fs/f2fs/segment.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 8c7af8b4fc47..0457d620011f 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -2193,7 +2193,7 @@ void f2fs_clear_prefree_segments(struct f2fs_sb_info *sbi,
len = next_pos - cur_pos;
if (f2fs_sb_has_blkzoned(sbi) ||
- (force && len < cpc->trim_minlen))
+ !force || len < cpc->trim_minlen)
goto skip;
f2fs_issue_discard(sbi, entry->start_blkaddr + cur_pos,
--
2.41.0.162.gfafddb0af9-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2023-06-14 16:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-13 20:39 [f2fs-dev] [PATCH] f2fs: do not issue small discard commands during checkpoint Jaegeuk Kim
[not found] ` <CGME20230613204109epcas2p158ecc100d3fe2db1ab2b7ee8335d01e7@epcms2p4>
2023-06-14 6:07 ` Daejun Park
2023-06-14 16:12 ` Jaegeuk Kim
2023-06-14 16:10 ` Jaegeuk Kim [this message]
2023-07-03 1:27 ` [f2fs-dev] [PATCH v2] " Chao Yu
2023-07-04 10:53 ` Jaegeuk Kim
2023-07-04 14:58 ` Chao Yu
2023-07-05 17:30 ` Jaegeuk Kim
2023-07-06 0:46 ` Chao Yu
2023-07-11 8:00 ` Chao Yu
2023-07-11 16:37 ` Jaegeuk Kim
2023-07-12 1:33 ` Chao Yu
2023-07-12 15:55 ` Jaegeuk Kim
2023-07-13 1:31 ` Chao Yu
2023-07-18 3:57 ` Chao Yu
2023-07-21 20:23 ` Jaegeuk Kim
2023-07-25 13:18 ` Chao Yu
2023-08-04 20:52 ` Jaegeuk Kim
2023-08-07 2:21 ` Chao Yu
2023-08-07 19:55 ` Jaegeuk Kim
2023-08-08 0:50 ` Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZInmkgjDnAUD5Nk0@google.com \
--to=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).