* [PATCH v2] f2fs: remove nested usage of plug list
@ 2018-04-08 2:59 Yunlei He
2018-04-08 3:43 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Yunlei He @ 2018-04-08 2:59 UTC (permalink / raw)
To: jaegeuk, yuchao0, linux-f2fs-devel
-f2fs_file_write_iter
-blk_start_plug
-__generic_file_write_iter
...
-do_blockdev_direct_IO
-blk_start_plug
...
-blk_finish_plug
...
-blk_finish_plug
which may conduct performance decrease in our platform
Signed-off-by: Yunlei He <heyunlei@huawei.com>
---
fs/f2fs/file.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 6b94f19..977c800 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2894,7 +2894,6 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
{
struct file *file = iocb->ki_filp;
struct inode *inode = file_inode(file);
- struct blk_plug plug;
ssize_t ret;
if (unlikely(f2fs_cp_error(F2FS_I_SB(inode))))
@@ -2939,9 +2938,7 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
return err;
}
}
- blk_start_plug(&plug);
ret = __generic_file_write_iter(iocb, from);
- blk_finish_plug(&plug);
clear_inode_flag(inode, FI_NO_PREALLOC);
/* if we couldn't write data, we should deallocate blocks. */
--
1.9.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] f2fs: remove nested usage of plug list
2018-04-08 2:59 [PATCH v2] f2fs: remove nested usage of plug list Yunlei He
@ 2018-04-08 3:43 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2018-04-08 3:43 UTC (permalink / raw)
To: Yunlei He, jaegeuk, linux-f2fs-devel
On 2018/4/8 10:59, Yunlei He wrote:
> -f2fs_file_write_iter
> -blk_start_plug
> -__generic_file_write_iter
> ...
> -do_blockdev_direct_IO
> -blk_start_plug
> ...
> -blk_finish_plug
> ...
> -blk_finish_plug
>
> which may conduct performance decrease in our platform
Have sent this before, let me integrate your description into mine and add
signed-off, anyway, well cleanup job! ;)
Thanks,
>
> Signed-off-by: Yunlei He <heyunlei@huawei.com>
> ---
> fs/f2fs/file.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index 6b94f19..977c800 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -2894,7 +2894,6 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
> {
> struct file *file = iocb->ki_filp;
> struct inode *inode = file_inode(file);
> - struct blk_plug plug;
> ssize_t ret;
>
> if (unlikely(f2fs_cp_error(F2FS_I_SB(inode))))
> @@ -2939,9 +2938,7 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
> return err;
> }
> }
> - blk_start_plug(&plug);
> ret = __generic_file_write_iter(iocb, from);
> - blk_finish_plug(&plug);
> clear_inode_flag(inode, FI_NO_PREALLOC);
>
> /* if we couldn't write data, we should deallocate blocks. */
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-08 3:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-08 2:59 [PATCH v2] f2fs: remove nested usage of plug list Yunlei He
2018-04-08 3:43 ` Chao Yu
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).