From: Hyunchul Lee <hyc.lee@gmail.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <yuchao0@huawei.com>
Cc: linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
kernel-team@lge.com, Hyunchul Lee <cheol.lee@lge.com>
Subject: [PATCH v2 0/3] f2fs: support passing down write hints to block layer
Date: Wed, 31 Jan 2018 11:36:56 +0900 [thread overview]
Message-ID: <1517366219-22166-1-git-send-email-hyc.lee@gmail.com> (raw)
From: Hyunchul Lee <cheol.lee@lge.com>
Changes since version 1:
- Set 'whint_mode' to off if 'active_logs' is two or four
- Minor fixes suggested by Chao
This set implements passing down write hints to block layer with the
following mapping. This mapping equals the conclusion from discussion in
the link, https://sourceforge.net/p/linux-f2fs/mailman/message/36170969/
But there are two exceptions. (1) the 'iohint_mode' mount option is changed
to 'whint_mode'. (2) in "user-based" mode, WRITE_LIFE_EXTREME is passed
down instead of WRITE_LIFE_NOT_SET for files flagged with ioctl(COLD) and
extension list.
1) whint_mode=off. F2FS only passes down WRITE_LIFE_NOT_SET.
2) whint_mode=user-based. F2FS tries to pass down hints given by
users.
User F2FS Block
---- ---- -----
META WRITE_LIFE_NOT_SET
HOT_NODE "
WARM_NODE "
COLD_NODE "
*ioctl(COLD) COLD_DATA WRITE_LIFE_EXTREME
*extension list " "
-- buffered io
WRITE_LIFE_EXTREME COLD_DATA WRITE_LIFE_EXTREME
WRITE_LIFE_SHORT HOT_DATA WRITE_LIFE_SHORT
WRITE_LIFE_NOT_SET WARM_DATA WRITE_LIFE_NOT_SET
WRITE_LIFE_NONE " "
WRITE_LIFE_MEDIUM " "
WRITE_LIFE_LONG " "
-- direct io
WRITE_LIFE_EXTREME COLD_DATA WRITE_LIFE_EXTREME
WRITE_LIFE_SHORT HOT_DATA WRITE_LIFE_SHORT
WRITE_LIFE_NOT_SET WARM_DATA WRITE_LIFE_NOT_SET
WRITE_LIFE_NONE " WRITE_LIFE_NONE
WRITE_LIFE_MEDIUM " WRITE_LIFE_MEDIUM
WRITE_LIFE_LONG " WRITE_LIFE_LONG
3) whint_mode=fs-based. F2FS passes down hints with its policy.
User F2FS Block
---- ---- -----
META WRITE_LIFE_MEDIUM;
HOT_NODE WRITE_LIFE_NOT_SET
WARM_NODE "
COLD_NODE WRITE_LIFE_NONE
ioctl(COLD) COLD_DATA WRITE_LIFE_EXTREME
extension list " "
-- buffered io
WRITE_LIFE_EXTREME COLD_DATA WRITE_LIFE_EXTREME
WRITE_LIFE_SHORT HOT_DATA WRITE_LIFE_SHORT
WRITE_LIFE_NOT_SET WARM_DATA WRITE_LIFE_LONG
WRITE_LIFE_NONE " "
WRITE_LIFE_MEDIUM " "
WRITE_LIFE_LONG " "
-- direct io
WRITE_LIFE_EXTREME COLD_DATA WRITE_LIFE_EXTREME
WRITE_LIFE_SHORT HOT_DATA WRITE_LIFE_SHORT
WRITE_LIFE_NOT_SET WARM_DATA WRITE_LIFE_NOT_SET
WRITE_LIFE_NONE " WRITE_LIFE_NONE
WRITE_LIFE_MEDIUM " WRITE_LIFE_MEDIUM
WRITE_LIFE_LONG " WRITE_LIFE_LONG
Hyunchul Lee (3):
f2fs: support passing down write hints given by users to block layer
f2fs: support passing down write hints to block layer with F2FS policy
f2fs: Add the 'whint_mode' mount option to f2fs documentation
Documentation/filesystems/f2fs.txt | 6 +++
fs/f2fs/data.c | 28 +++++++++--
fs/f2fs/f2fs.h | 10 ++++
fs/f2fs/segment.c | 98 ++++++++++++++++++++++++++++++++++++++
fs/f2fs/super.c | 35 +++++++++++++-
5 files changed, 171 insertions(+), 6 deletions(-)
--
1.9.1
next reply other threads:[~2018-01-31 2:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 2:36 Hyunchul Lee [this message]
2018-01-31 2:36 ` [PATCH v2 1/3] f2fs: support passing down write hints given by users to block layer Hyunchul Lee
2018-01-31 10:03 ` Chao Yu
2018-01-31 2:36 ` [PATCH v2 2/3] f2fs: support passing down write hints to block layer with F2FS policy Hyunchul Lee
2018-01-31 10:04 ` Chao Yu
2018-01-31 2:36 ` [PATCH v2 3/3] f2fs: Add the 'whint_mode' mount option to f2fs documentation Hyunchul Lee
2018-01-31 10:04 ` Chao Yu
2018-01-31 22:19 ` Jaegeuk Kim
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=1517366219-22166-1-git-send-email-hyc.lee@gmail.com \
--to=hyc.lee@gmail.com \
--cc=cheol.lee@lge.com \
--cc=jaegeuk@kernel.org \
--cc=kernel-team@lge.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.com \
/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).