mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <yuchao0@huawei.com>
Cc: linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, chao@kernel.org
Subject: Re: [PATCH] f2fs: enlarge block plug coverage
Date: Mon, 9 Apr 2018 11:02:41 -0700	[thread overview]
Message-ID: <20180409180241.GC17558@jaegeuk-macbookpro.roam.corp.google.com> (raw)
In-Reply-To: <03c21c2f-cb0e-dbd4-b48a-95c2678964d1@huawei.com>

On 04/08, Chao Yu wrote:
> On 2018/4/5 11:51, Jaegeuk Kim wrote:
> > On 04/04, Chao Yu wrote:
> >> This patch enlarges block plug coverage in __issue_discard_cmd, in
> >> order to collect more pending bios before issuing them, to avoid
> >> being disturbed by previous discard I/O in IO aware discard mode.
> > 
> > Hmm, then we need to wait for huge discard IO for over 10 secs, which
> 
> We found that total discard latency is rely on total discard number we issued
> last time instead of range or length discard covered. IMO, if we don't change
> .max_requests value, we will not suffer longer latency.
> 
> > will affect following read/write IOs accordingly. In order to avoid that,
> > we actually need to limit the discard size.
> 
> If you are worry about I/O interference in between discard and rw, I suggest to
> decrease .max_requests value.

What do you mean? This will produce more pending requests in the queue?

> 
> Thanks,
> 
> > 
> > Thanks,
> > 
> >>
> >> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> >> ---
> >>  fs/f2fs/segment.c | 7 +++++--
> >>  1 file changed, 5 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> >> index 8f0b5ba46315..4287e208c040 100644
> >> --- a/fs/f2fs/segment.c
> >> +++ b/fs/f2fs/segment.c
> >> @@ -1208,10 +1208,12 @@ static int __issue_discard_cmd(struct f2fs_sb_info *sbi,
> >>  		pend_list = &dcc->pend_list[i];
> >>  
> >>  		mutex_lock(&dcc->cmd_lock);
> >> +
> >> +		blk_start_plug(&plug);
> >> +
> >>  		if (list_empty(pend_list))
> >>  			goto next;
> >>  		f2fs_bug_on(sbi, !__check_rb_tree_consistence(sbi, &dcc->root));
> >> -		blk_start_plug(&plug);
> >>  		list_for_each_entry_safe(dc, tmp, pend_list, list) {
> >>  			f2fs_bug_on(sbi, dc->state != D_PREP);
> >>  
> >> @@ -1227,8 +1229,9 @@ static int __issue_discard_cmd(struct f2fs_sb_info *sbi,
> >>  			if (++iter >= dpolicy->max_requests)
> >>  				break;
> >>  		}
> >> -		blk_finish_plug(&plug);
> >>  next:
> >> +		blk_finish_plug(&plug);
> >> +
> >>  		mutex_unlock(&dcc->cmd_lock);
> >>  
> >>  		if (iter >= dpolicy->max_requests)
> >> -- 
> >> 2.15.0.55.gc2ece9dc4de6
> > 
> > .
> > 

  reply	other threads:[~2018-04-09 18:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04  8:54 Chao Yu
2018-04-05  3:51 ` Jaegeuk Kim
2018-04-08  1:29   ` Chao Yu
2018-04-09 18:02     ` Jaegeuk Kim [this message]
2018-04-10  2:34       ` Chao Yu
2018-04-10  4:10         ` Jaegeuk Kim
2018-04-10  7:22           ` Chao Yu
2018-04-13  1:06             ` Jaegeuk Kim
2018-04-13  1:27               ` Chao Yu
2018-04-13  4:07                 ` Jaegeuk Kim
2018-04-13  7:13                   ` 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=20180409180241.GC17558@jaegeuk-macbookpro.roam.corp.google.com \
    --to=jaegeuk@kernel.org \
    --cc=chao@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuchao0@huawei.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: 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®