From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <chao@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: avoid unneeded preflush during checkpoint()
Date: Mon, 7 Feb 2022 11:14:50 -0800 [thread overview]
Message-ID: <YgFvqnoa61BspqmW@google.com> (raw)
In-Reply-To: <20220207113516.9489-1-chao@kernel.org>
On 02/07, Chao Yu wrote:
> During checkpoint, we have committed preflush command via f2fs_flush_device_cache()
787 int f2fs_flush_device_cache(struct f2fs_sb_info *sbi)
788 {
789 int ret = 0, i;
790
791 if (!f2fs_is_multi_device(sbi))
792 return 0;
Seems a wrong assumption.
> to persist all metadata pages except last #2 CP pack page, so we don't need to
> commit another preflush command in commit_checkpoint(), remove it to avoid unneeded
> write cache overhead.
>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
> fs/f2fs/data.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 8c417864c66a..15ac18bbbc8e 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -598,7 +598,7 @@ static void __f2fs_submit_merged_write(struct f2fs_sb_info *sbi,
> io->fio.op = REQ_OP_WRITE;
> io->fio.op_flags = REQ_META | REQ_PRIO | REQ_SYNC;
> if (!test_opt(sbi, NOBARRIER))
> - io->fio.op_flags |= REQ_PREFLUSH | REQ_FUA;
> + io->fio.op_flags |= REQ_FUA;
> }
> __submit_merged_bio(io);
> up_write(&io->io_rwsem);
> --
> 2.32.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <chao@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] f2fs: avoid unneeded preflush during checkpoint()
Date: Mon, 7 Feb 2022 11:14:50 -0800 [thread overview]
Message-ID: <YgFvqnoa61BspqmW@google.com> (raw)
In-Reply-To: <20220207113516.9489-1-chao@kernel.org>
On 02/07, Chao Yu wrote:
> During checkpoint, we have committed preflush command via f2fs_flush_device_cache()
787 int f2fs_flush_device_cache(struct f2fs_sb_info *sbi)
788 {
789 int ret = 0, i;
790
791 if (!f2fs_is_multi_device(sbi))
792 return 0;
Seems a wrong assumption.
> to persist all metadata pages except last #2 CP pack page, so we don't need to
> commit another preflush command in commit_checkpoint(), remove it to avoid unneeded
> write cache overhead.
>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
> fs/f2fs/data.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 8c417864c66a..15ac18bbbc8e 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -598,7 +598,7 @@ static void __f2fs_submit_merged_write(struct f2fs_sb_info *sbi,
> io->fio.op = REQ_OP_WRITE;
> io->fio.op_flags = REQ_META | REQ_PRIO | REQ_SYNC;
> if (!test_opt(sbi, NOBARRIER))
> - io->fio.op_flags |= REQ_PREFLUSH | REQ_FUA;
> + io->fio.op_flags |= REQ_FUA;
> }
> __submit_merged_bio(io);
> up_write(&io->io_rwsem);
> --
> 2.32.0
next prev parent reply other threads:[~2022-02-07 19:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 11:35 [f2fs-dev] [PATCH] f2fs: avoid unneeded preflush during checkpoint() Chao Yu
2022-02-07 11:35 ` Chao Yu
2022-02-07 19:14 ` Jaegeuk Kim [this message]
2022-02-07 19:14 ` Jaegeuk Kim
2022-02-08 1:35 ` [f2fs-dev] " Chao Yu
2022-02-08 1:35 ` Chao Yu
2022-02-08 9:18 ` [f2fs-dev] " Chao Yu
2022-02-08 9:18 ` 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=YgFvqnoa61BspqmW@google.com \
--to=jaegeuk@kernel.org \
--cc=chao@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.