linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Josef Bacik <josef@toxicpanda.com>,
	linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH v2 07/11] btrfs: rework btrfs_calc_reclaim_metadata_size
Date: Fri, 9 Oct 2020 12:53:19 +0300	[thread overview]
Message-ID: <c8026e69-3549-d8c3-fabf-f62fd5b53e01@suse.com> (raw)
In-Reply-To: <2017283776449f9c59db05f301e7929e0a8db0bf.1602189832.git.josef@toxicpanda.com>



On 8.10.20 г. 23:48 ч., Josef Bacik wrote:
> Currently btrfs_calc_reclaim_metadata_size does two things, it returns
> the space currently required for flushing by the tickets, and if there
> are no tickets it calculates a value for the preemptive flushing.
> 
> However for the normal ticketed flushing we really only care about the
> space required for tickets.  We will accidentally come in and flush one
> time, but as soon as we see there are no tickets we bail out of our
> flushing.
> 
> Fix this by making btrfs_calc_reclaim_metadata_size really only tell us
> what is required for flushing if we have people waiting on space.  Then
> move the preemptive flushing logic into need_preemptive_reclaim().  We
> ignore btrfs_calc_reclaim_metadata_size() in need_preemptive_reclaim()
> because if we are in this path then we made our reservation and there
> are not pending tickets currently, so we do not need to check it, simply
> do the fuzzy logic to check if we're getting low on space.
> 
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>


This really does code movement and subsequently reworks the newly
removed code in need_preemptive_reclaim so:

Reviewed-by: Nikolay Borisov <nborisov@suse.com>

  reply	other threads:[~2020-10-09  9:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 20:48 [PATCH v2 00/11] Improve preemptive ENOSPC flushing Josef Bacik
2020-10-08 20:48 ` [PATCH v2 01/11] btrfs: add a trace point for reserve tickets Josef Bacik
2020-10-09  7:20   ` Nikolay Borisov
2020-10-08 20:48 ` [PATCH v2 02/11] btrfs: track ordered bytes instead of just dio ordered bytes Josef Bacik
2020-10-09  7:25   ` Nikolay Borisov
2020-10-08 20:48 ` [PATCH v2 03/11] btrfs: introduce a FORCE_COMMIT_TRANS flush operation Josef Bacik
2020-10-08 20:48 ` [PATCH v2 04/11] btrfs: improve preemptive background space flushing Josef Bacik
2020-10-08 20:48 ` [PATCH v2 05/11] btrfs: rename need_do_async_reclaim Josef Bacik
2020-10-08 20:48 ` [PATCH v2 06/11] btrfs: check reclaim_size in need_preemptive_reclaim Josef Bacik
2020-10-08 20:48 ` [PATCH v2 07/11] btrfs: rework btrfs_calc_reclaim_metadata_size Josef Bacik
2020-10-09  9:53   ` Nikolay Borisov [this message]
2020-10-08 20:48 ` [PATCH v2 08/11] btrfs: simplify the logic in need_preemptive_flushing Josef Bacik
2020-10-08 20:48 ` [PATCH v2 09/11] btrfs: implement space clamping for preemptive flushing Josef Bacik
2020-10-09 12:22   ` Nikolay Borisov
2020-10-08 20:48 ` [PATCH v2 10/11] btrfs: adjust the flush trace point to include the source Josef Bacik
2020-10-08 20:48 ` [PATCH v2 11/11] btrfs: add a trace class for dumping the current ENOSPC state Josef Bacik
2020-10-09  9:50   ` Nikolay Borisov
2020-10-09 10:39 ` [PATCH v2 00/11] 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=c8026e69-3549-d8c3-fabf-f62fd5b53e01@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).