From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH 4/5] f2fs: issue discard aggressively in the gc_urgent mode
Date: Wed, 28 Feb 2018 18:37:20 -0800 [thread overview]
Message-ID: <20180301023720.GA18665@jaegeuk-macbookpro.roam.corp.google.com> (raw)
In-Reply-To: <20180226174731.26679-4-jaegeuk@kernel.org>
Change log from v1:
- relax more to issue discard commands
This patch avoids to skip discard commands when user sets gc_urgent mode.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/segment.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 5e5e2936a26a..1e3dd3de4ecc 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1411,12 +1411,11 @@ static int issue_discard_thread(void *data)
if (kthread_should_stop())
return 0;
- if (dcc->discard_wake) {
+ if (dcc->discard_wake)
dcc->discard_wake = 0;
- if (sbi->gc_thread && sbi->gc_thread->gc_urgent)
- init_discard_policy(&dpolicy,
- DPOLICY_FORCE, 1);
- }
+
+ if (sbi->gc_thread && sbi->gc_thread->gc_urgent)
+ init_discard_policy(&dpolicy, DPOLICY_FORCE, 1);
sb_start_intwrite(sbi->sb);
@@ -1727,7 +1726,7 @@ void init_discard_policy(struct discard_policy *dpolicy,
} else if (discard_type == DPOLICY_FORCE) {
dpolicy->min_interval = DEF_MIN_DISCARD_ISSUE_TIME;
dpolicy->max_interval = DEF_MAX_DISCARD_ISSUE_TIME;
- dpolicy->io_aware = true;
+ dpolicy->io_aware = false;
} else if (discard_type == DPOLICY_FSTRIM) {
dpolicy->io_aware = false;
} else if (discard_type == DPOLICY_UMOUNT) {
--
2.15.0.531.g2ccb3012c9-goog
next prev parent reply other threads:[~2018-03-01 2:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 17:47 [PATCH 1/5] f2fs: add mount option for segment allocation policy Jaegeuk Kim
2018-02-26 17:47 ` [PATCH 2/5] f2fs: add auto tuning for small devices Jaegeuk Kim
2018-02-27 10:35 ` Chao Yu
2018-02-26 17:47 ` [PATCH 3/5] f2fs: set readdir_ra by default Jaegeuk Kim
2018-02-27 10:35 ` Chao Yu
2018-02-26 17:47 ` [PATCH 4/5] f2fs: issue discard aggressively in the gc_urgent mode Jaegeuk Kim
2018-02-27 10:36 ` Chao Yu
2018-03-01 2:37 ` Jaegeuk Kim [this message]
2018-02-26 17:47 ` [PATCH 5/5] f2fs: don't stop GC if GC is contended Jaegeuk Kim
2018-02-27 10:36 ` Chao Yu
2018-02-27 10:33 ` [PATCH 1/5] f2fs: add mount option for segment allocation policy Chao Yu
2018-02-28 5:09 ` [PATCH 1/5 v2] " Jaegeuk Kim
2018-02-28 9:33 ` Chao Yu
2018-02-28 13:47 ` [f2fs-dev] " Chao Yu
2018-03-01 2:53 ` Jaegeuk Kim
2018-02-28 13:52 ` 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=20180301023720.GA18665@jaegeuk-macbookpro.roam.corp.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).