mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-fsdevel@vger.kernel.org>,
	<linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [PATCH] f2fs: merge WRITE bio into previous WRITE_SYNC
Date: Fri, 2 Sep 2016 15:33:33 +0800	[thread overview]
Message-ID: <10d2270d-6226-a269-c8a4-75bedfd0364c@huawei.com> (raw)
In-Reply-To: <20160827005358.91477-1-jaegeuk@kernel.org>

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);
> 

  reply	other threads:[~2016-09-02  7:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-27  0:53 Jaegeuk Kim
2016-09-02  7:33 ` Chao Yu [this message]
2016-09-02 18:36   ` Jaegeuk Kim
2016-09-07 14:12     ` [f2fs-dev] " Chao Yu
2016-09-08  0:26       ` Jaegeuk Kim
2016-09-08 16:09         ` 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=10d2270d-6226-a269-c8a4-75bedfd0364c@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®