From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 4/7] f2fs: don't wake up too frequently, if there is lots of IOs
Date: Tue, 29 Jan 2019 07:47:14 +0800 [thread overview]
Message-ID: <20190128234717.77225-4-jaegeuk@kernel.org> (raw)
In-Reply-To: <20190128234717.77225-1-jaegeuk@kernel.org>
Otherwise, it wakes up discard thread which will sleep again by busy IOs
in a loop.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/segment.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index a77f76f528b6..5c7ed0442d6e 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -865,7 +865,7 @@ static inline void wake_up_discard_thread(struct f2fs_sb_info *sbi, bool force)
}
}
mutex_unlock(&dcc->cmd_lock);
- if (!wakeup)
+ if (!wakeup || !is_idle(sbi, DISCARD_TIME))
return;
wake_up:
dcc->discard_wake = 1;
--
2.19.0.605.g01d371f741-goog
next prev parent reply other threads:[~2019-01-28 23:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 23:47 [PATCH 1/7] f2fs: run discard jobs when put_super Jaegeuk Kim
2019-01-28 23:47 ` [PATCH 2/7] f2fs: add quick mode of checkpoint=disable for QA Jaegeuk Kim
2019-02-01 15:48 ` [f2fs-dev] " Chao Yu
2019-02-04 16:55 ` Jaegeuk Kim
2019-02-13 3:26 ` Chao Yu
2019-01-28 23:47 ` [PATCH 3/7] f2fs: try to keep CP_TRIMMED_FLAG after successful umount Jaegeuk Kim
2019-02-01 15:58 ` [f2fs-dev] " Chao Yu
2019-01-28 23:47 ` Jaegeuk Kim [this message]
2019-02-01 15:58 ` [f2fs-dev] [PATCH 4/7] f2fs: don't wake up too frequently, if there is lots of IOs Chao Yu
2019-01-28 23:47 ` [PATCH 5/7] f2fs: avoid null pointer exception in dcc_info Jaegeuk Kim
2019-02-01 16:00 ` [f2fs-dev] " Chao Yu
2019-01-28 23:47 ` [PATCH 6/7] f2fs: flush quota blocks after turnning it off Jaegeuk Kim
2019-02-01 16:08 ` [f2fs-dev] " Chao Yu
2019-02-04 16:59 ` Jaegeuk Kim
2019-02-13 3:27 ` Chao Yu
2019-01-28 23:47 ` [PATCH 7/7] f2fs: sync filesystem after roll-forward recovery Jaegeuk Kim
2019-02-01 14:12 ` [f2fs-dev] [PATCH 1/7] f2fs: run discard jobs when put_super 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=20190128234717.77225-4-jaegeuk@kernel.org \
--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).