From: Nikolay Borisov <nborisov@suse.com>
To: Josef Bacik <josef@toxicpanda.com>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 4/9] btrfs: check reclaim_size in need_preemptive_reclaim
Date: Thu, 1 Oct 2020 16:23:50 +0300 [thread overview]
Message-ID: <3a3a2fc0-53fe-a080-e166-85b129db2ff1@suse.com> (raw)
In-Reply-To: <855a8376fa0d8e63e066ac323a985fe7bc1e562f.1601495426.git.josef@toxicpanda.com>
On 30.09.20 г. 23:01 ч., Josef Bacik wrote:
> If we're flushing space for tickets then we have
> space_info->reclaim_size set and we do not need to do background
> reclaim.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
I'm fine with this but check my remak below.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
> ---
> fs/btrfs/space-info.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c
> index 98207ea57a3d..518749093bc5 100644
> --- a/fs/btrfs/space-info.c
> +++ b/fs/btrfs/space-info.c
> @@ -805,6 +805,13 @@ static inline int need_preemptive_reclaim(struct btrfs_fs_info *fs_info,
> if ((space_info->bytes_used + space_info->bytes_reserved) >= thresh)
> return 0;
>
> + /*
> + * We have tickets queued, bail so we don't compete with the async
> + * flushers.
> + */
> + if (space_info->reclaim_size)
> + return 0;
> +
nit: So where do we draw the line if this check should be in this
function or in __reserve_bytes so that we eliminate the case where a
preemptive reclaim is scheduled only to return instantly because of
tickets. Though the 'if' in __reserve_bytes is getting slitghly out of
hand :)
> if (!btrfs_calc_reclaim_metadata_size(fs_info, space_info))
> return 0;
>
>
next prev parent reply other threads:[~2020-10-01 13:23 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 20:01 [PATCH 0/9] Improve preemptive ENOSPC flushing Josef Bacik
2020-09-30 20:01 ` [PATCH 1/9] btrfs: add a trace point for reserve tickets Josef Bacik
2020-10-01 5:54 ` Nikolay Borisov
2020-10-01 21:33 ` Josef Bacik
2020-09-30 20:01 ` [PATCH 2/9] btrfs: improve preemptive background space flushing Josef Bacik
2020-10-01 13:19 ` Nikolay Borisov
2020-10-01 21:35 ` Josef Bacik
2020-09-30 20:01 ` [PATCH 3/9] btrfs: rename need_do_async_reclaim Josef Bacik
2020-10-01 13:20 ` Nikolay Borisov
2020-10-01 13:24 ` Nikolay Borisov
2020-10-01 21:37 ` Josef Bacik
2020-09-30 20:01 ` [PATCH 4/9] btrfs: check reclaim_size in need_preemptive_reclaim Josef Bacik
2020-10-01 13:23 ` Nikolay Borisov [this message]
2020-10-01 21:36 ` Josef Bacik
2020-09-30 20:01 ` [PATCH 5/9] btrfs: rework btrfs_calc_reclaim_metadata_size Josef Bacik
2020-10-01 13:59 ` Nikolay Borisov
2020-10-01 21:38 ` Josef Bacik
2020-09-30 20:01 ` [PATCH 6/9] btrfs: simplify the logic in need_preemptive_flushing Josef Bacik
2020-10-01 14:09 ` Nikolay Borisov
2020-10-01 21:40 ` Josef Bacik
2020-10-02 7:13 ` Nikolay Borisov
2020-09-30 20:01 ` [PATCH 7/9] btrfs: implement space clamping for preemptive flushing Josef Bacik
2020-10-01 14:49 ` Nikolay Borisov
2020-10-01 21:41 ` Josef Bacik
2020-09-30 20:01 ` [PATCH 8/9] btrfs: adjust the flush trace point to include the source Josef Bacik
2020-10-01 15:32 ` Nikolay Borisov
2020-09-30 20:01 ` [PATCH 9/9] btrfs: add a trace class for dumping the current ENOSPC state Josef Bacik
2020-10-02 8:30 ` Nikolay Borisov
2020-10-02 13:45 ` Josef Bacik
2020-10-06 12:55 ` [PATCH 0/9] Improve preemptive ENOSPC flushing Nikolay Borisov
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=3a3a2fc0-53fe-a080-e166-85b129db2ff1@suse.com \
--to=nborisov@suse.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).