From: Yangtao Li <frank.li@vivo.com> To: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org> Cc: Yangtao Li <frank.li@vivo.com>, Lu Hongfei <luhongfei@vivo.com>, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH v2] f2fs: enable nowait async buffered writes Date: Tue, 13 Jun 2023 15:29:11 +0800 [thread overview] Message-ID: <20230613072912.52249-1-frank.li@vivo.com> (raw) This adds the async buffered write support to f2fs, the following is the relevant test data. iodepth | 1 | 2 | 4 | 8 | 16 | before(M/s) | 1012 | 1133 | 894 | 981 | 866 | after(M/s) | 1488 | 1896 | 2081 | 2188 | 2207 | The following is the fio configuration: [global] ioengine=io_uring sqthread_poll=1 threads=1 iodepth=32 hipri=0 direct=0 fixedbufs=0 uncached=0 nowait=0 force_async=0 randrepeat=0 time_based=0 size=256M filename=/data/test/local/io_uring_test group_reporting [read256B-rand] bs=4096 rw=randwrite numjobs=1 Signed-off-by: Lu Hongfei <luhongfei@vivo.com> Signed-off-by: Yangtao Li <frank.li@vivo.com> --- fs/f2fs/file.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 4dd4e2bd000a..74ecc9e20619 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -554,7 +554,7 @@ static int f2fs_file_open(struct inode *inode, struct file *filp) if (err) return err; - filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC; + filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC | FMODE_BUF_WASYNC; return dquot_file_open(inode, filp); } @@ -4523,9 +4523,6 @@ static ssize_t f2fs_buffered_write_iter(struct kiocb *iocb, struct inode *inode = file_inode(file); ssize_t ret; - if (iocb->ki_flags & IOCB_NOWAIT) - return -EOPNOTSUPP; - current->backing_dev_info = inode_to_bdi(inode); ret = generic_perform_write(iocb, from); current->backing_dev_info = NULL; -- 2.39.0
WARNING: multiple messages have this Message-ID (diff)
From: Yangtao Li via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net> To: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org> Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Lu Hongfei <luhongfei@vivo.com>, Yangtao Li <frank.li@vivo.com> Subject: [f2fs-dev] [PATCH v2] f2fs: enable nowait async buffered writes Date: Tue, 13 Jun 2023 15:29:11 +0800 [thread overview] Message-ID: <20230613072912.52249-1-frank.li@vivo.com> (raw) This adds the async buffered write support to f2fs, the following is the relevant test data. iodepth | 1 | 2 | 4 | 8 | 16 | before(M/s) | 1012 | 1133 | 894 | 981 | 866 | after(M/s) | 1488 | 1896 | 2081 | 2188 | 2207 | The following is the fio configuration: [global] ioengine=io_uring sqthread_poll=1 threads=1 iodepth=32 hipri=0 direct=0 fixedbufs=0 uncached=0 nowait=0 force_async=0 randrepeat=0 time_based=0 size=256M filename=/data/test/local/io_uring_test group_reporting [read256B-rand] bs=4096 rw=randwrite numjobs=1 Signed-off-by: Lu Hongfei <luhongfei@vivo.com> Signed-off-by: Yangtao Li <frank.li@vivo.com> --- fs/f2fs/file.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 4dd4e2bd000a..74ecc9e20619 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -554,7 +554,7 @@ static int f2fs_file_open(struct inode *inode, struct file *filp) if (err) return err; - filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC; + filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC | FMODE_BUF_WASYNC; return dquot_file_open(inode, filp); } @@ -4523,9 +4523,6 @@ static ssize_t f2fs_buffered_write_iter(struct kiocb *iocb, struct inode *inode = file_inode(file); ssize_t ret; - if (iocb->ki_flags & IOCB_NOWAIT) - return -EOPNOTSUPP; - current->backing_dev_info = inode_to_bdi(inode); ret = generic_perform_write(iocb, from); current->backing_dev_info = NULL; -- 2.39.0 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next reply other threads:[~2023-06-13 7:29 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-06-13 7:29 Yangtao Li [this message] 2023-06-13 7:29 ` [f2fs-dev] [PATCH v2] f2fs: enable nowait async buffered writes Yangtao Li via Linux-f2fs-devel 2023-06-15 18:00 ` patchwork-bot+f2fs 2023-06-15 18:00 ` patchwork-bot+f2fs 2023-06-19 1:05 ` Chao Yu 2023-06-19 1:05 ` [f2fs-dev] " 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=20230613072912.52249-1-frank.li@vivo.com \ --to=frank.li@vivo.com \ --cc=chao@kernel.org \ --cc=jaegeuk@kernel.org \ --cc=linux-f2fs-devel@lists.sourceforge.net \ --cc=linux-kernel@vger.kernel.org \ --cc=luhongfei@vivo.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: linkBe 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.