From: Chao Yu <yuchao0@huawei.com>
To: Sahitya Tummala <stummala@codeaurora.org>,
Jaegeuk Kim <jaegeuk@kernel.org>,
<linux-f2fs-devel@lists.sourceforge.net>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] f2fs: fix is_idle() check for discard type
Date: Thu, 13 Jun 2019 14:52:43 +0800 [thread overview]
Message-ID: <d3b4b733-78ab-29bb-9441-c6e4e7efaea9@huawei.com> (raw)
In-Reply-To: <1559813893-23452-1-git-send-email-stummala@codeaurora.org>
On 2019/6/6 17:38, Sahitya Tummala wrote:
> The discard thread should issue upto dpolicy->max_requests at once
> and wait for all those discard requests at once it reaches
> dpolicy->max_requests. It should then sleep for dpolicy->min_interval
> timeout before issuing the next batch of discard requests. But in the
> current code of is_idle(), it checks for dcc_info->queued_discard and
> aborts issuing the discard batch of max_requests. This
> dcc_info->queued_discard will be true always once one discard command
> is issued.
>
> It is thus resulting into this type of discard request pattern -
>
> - Issue discard request#1
> - is_idle() returns false, discard thread waits for request#1 and then
> sleeps for min_interval 50ms.
> - Issue discard request#2
> - is_idle() returns false, discard thread waits for request#2 and then
> sleeps for min_interval 50ms.
> - and so on for all other discard requests, assuming f2fs is idle w.r.t
> other conditions.
>
> With this fix, the pattern will look like this -
>
> - Issue discard request#1
> - Issue discard request#2
> and so on upto max_requests of 8
> - Issue discard request#8
> - wait for min_interval 50ms.
>
Fixes: fef4129ec2e6 ("f2fs: fix to be aware discard/preflush/dio command in
is_idle()")
> Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Ah, thanks for fixing this bug.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks,
prev parent reply other threads:[~2019-06-13 16:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-06 9:38 Sahitya Tummala
2019-06-13 6:52 ` 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=d3b4b733-78ab-29bb-9441-c6e4e7efaea9@huawei.com \
--to=yuchao0@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=stummala@codeaurora.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
Powered by JetHome