Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1474927

Re: [PATCH] f2fs: merge WRITE bio into previous WRITE_SYNC

From Chao Yu <yuchao0@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH] f2fs: merge WRITE bio into previous WRITE_SYNC
Date 2016-09-02 09:40 +0200
Message-ID <scReW-4Va-11@gated-at.bofh.it> (permalink)
References <saA8D-61b-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Jaegeuk,

On 2016/8/27 8:53, Jaegeuk Kim wrote:
> This can avoid bio splits due to different op_flags.

I thought about this, but I think this is not a good idea to increase merging
ratio of pages in bio. It breaks the rule of SYNC/ASYNC IO defined by system
which indicate degree of IO emergency, finally, some/more non-emergent IO will
treated as emergent one by IO scheduler, it will interrupt SYNC IOs in block
layer, more seriously, it may make real SYNC IO starvation.

Thanks,

> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>  fs/f2fs/data.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 7c8e219..c7c2022 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -267,6 +267,11 @@ void f2fs_submit_page_mbio(struct f2fs_io_info *fio)
>  
>  	down_write(&io->io_rwsem);
>  
> +	/* WRITE can be merged into previous WRITE_SYNC */
> +	if (io->bio && io->last_block_in_bio == fio->new_blkaddr - 1 &&
> +			io->fio.op == fio->op && io->fio.op_flags == WRITE_SYNC)
> +		fio->op_flags = WRITE_SYNC;
> +
>  	if (io->bio && (io->last_block_in_bio != fio->new_blkaddr - 1 ||
>  	    (io->fio.op != fio->op || io->fio.op_flags != fio->op_flags)))
>  		__submit_merged_bio(io);
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] f2fs: merge WRITE bio into previous WRITE_SYNC Jaegeuk Kim <jaegeuk@kernel.org> - 2016-08-27 03:00 +0200
  Re: [PATCH] f2fs: merge WRITE bio into previous WRITE_SYNC Chao Yu <yuchao0@huawei.com> - 2016-09-02 09:40 +0200
    Re: [PATCH] f2fs: merge WRITE bio into previous WRITE_SYNC Jaegeuk Kim <jaegeuk@kernel.org> - 2016-09-02 20:40 +0200
      Re: [f2fs-dev] [PATCH] f2fs: merge WRITE bio into previous WRITE_SYNC Chao Yu <chao@kernel.org> - 2016-09-07 16:20 +0200
        Re: [f2fs-dev] [PATCH] f2fs: merge WRITE bio into previous WRITE_SYNC Jaegeuk Kim <jaegeuk@kernel.org> - 2016-09-08 02:30 +0200
          Re: [f2fs-dev] [PATCH] f2fs: merge WRITE bio into previous WRITE_SYNC Chao Yu <chao@kernel.org> - 2016-09-08 18:10 +0200

csiph-web