LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Ju Hyung Park <qkrwngud825@gmail.com>,
	Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH] f2fs: issue discard commands proactively in high fs utilization
Date: Tue, 14 May 2019 16:29:32 +0800	[thread overview]
Message-ID: <73fc6da8-7b89-3b02-8856-bd6876c50259@huawei.com> (raw)
In-Reply-To: <CAD14+f154_t1-TbbSDb9xV_ikDAWfF+8H7aOSK4VF8UmqWRDAQ@mail.gmail.com>

On 2019/5/14 13:39, Ju Hyung Park wrote:
> On Wed, May 30, 2018 at 5:51 AM Jaegeuk Kim <jaegeuk@kernel.org> wrote:
>>
>> In the high utilization like over 80%, we don't expect huge # of large discard
>> commands, but do many small pending discards which affects FTL GCs a lot.
>> Let's issue them in that case.
>>
>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
>> ---
>> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
>> index 6e40e536dae0..8c1f7a6bf178 100644
>> --- a/fs/f2fs/segment.c
>> +++ b/fs/f2fs/segment.c
>> @@ -915,6 +915,38 @@ static void __check_sit_bitmap(struct f2fs_sb_info *sbi,
>> +                       dpolicy->max_interval = DEF_MIN_DISCARD_ISSUE_TIME;
> 
> Isn't this way too aggressive?
> 
> Discard thread will wake up on 50ms interval just because the user has
> used 80% of space.
> 60,000ms vs 50ms is too much of a stark difference.
> 
> I feel something like 10 seconds(10,000ms) could be a much more
> reasonable choice than this.

Hmm.. I agree that current hard code method is not flexible enough, and I
proposed below patch last year to adjust interval according to space usage, it
looks Jaegeuk partially agreed with that, and pointed out we need to distinguish
low/high-end storage to decide interval. And also you point out that btrfs
introduces mount option "ssd" to let user give the device type, and we can
distinguish with that. :P

https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/commit/?h=f2fs-dev&id=009f548e37ca5d9b4cad9e3c15c2164c53eff1df

But I pended below patch based on Jaegeuk's and your idea due to other work...

https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/commit/?h=f2fs-dev&id=47a992c12398c98e739e3eedc2743824459df943

Thanks,

> 
> Thanks.
> 
> 
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> .
> 

      reply	other threads:[~2019-05-14  8:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29 20:50 Jaegeuk Kim
2018-05-30 14:29 ` [f2fs-dev] " Chao Yu
2019-05-14  5:39 ` Ju Hyung Park
2019-05-14  8:29   ` Chao Yu [this message]

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=73fc6da8-7b89-3b02-8856-bd6876c50259@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qkrwngud825@gmail.com \
    --subject='Re: [f2fs-dev] [PATCH] f2fs: issue discard commands proactively in high fs utilization' \
    /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

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