From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: Anand Jain <anand.jain@oracle.com>, David Sterba <dsterba@suse.com>
Cc: "linux-btrfs @ vger . kernel . org" <linux-btrfs@vger.kernel.org>,
Naohiro Aota <Naohiro.Aota@wdc.com>,
Josef Bacik <josef@toxicpanda.com>,
Filipe Manana <fdmanana@suse.com>
Subject: Re: [PATCH v2 2/2] btrfs: zoned: automatically reclaim zones
Date: Wed, 7 Apr 2021 11:29:26 +0000 [thread overview]
Message-ID: <SA0PR04MB74181910EBE1A9DF746FB2E69B759@SA0PR04MB7418.namprd04.prod.outlook.com> (raw)
In-Reply-To: f747fac1-fd6d-701f-6c8c-2cf779b3a145@oracle.com
On 23/03/2021 07:45, Anand Jain wrote:
>
> On 19/03/2021 18:48, Johannes Thumshirn wrote:
>> When a file gets deleted on a zoned file system, the space freed is not
>> returned back into the block group's free space, but is migrated to
>> zone_unusable.
>>
>> As this zone_unusable space is behind the current write pointer it is not
>> possible to use it for new allocations. In the current implementation a
>> zone is reset once all of the block group's space is accounted as zone
>> unusable.
>>
>> This behaviour can lead to premature ENOSPC errors on a busy file system.
>>
>> Instead of only reclaiming the zone once it is completely unusable,
>> kick off a reclaim job once the amount of unusable bytes exceeds a user
>> configurable threshold between 51% and 100%. It can be set per mounted
>> filesystem via the sysfs tunable bg_reclaim_threshold which is set to 75%
>> per default.
>>
>> Similar to reclaiming unused block groups, these dirty block groups are
>> added to a to_reclaim list and then on a transaction commit, the reclaim
>> process is triggered but after we deleted unused block groups, which will
>> free space for the relocation process.
>>
>
> Still, in the code below, I don't see the zone write pointer reset of
> the zone_unusable done here. Where does that happen? Or what did I miss?
This is indeed correct, relocation doesn't call trim/zone-reset. I've added
a patch to the series taking this into account. Thanks for spotting.
next prev parent reply other threads:[~2021-04-07 11:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-19 10:48 [PATCH v2 0/2] btrfs: zoned: automatic BG reclaim Johannes Thumshirn
2021-03-19 10:48 ` [PATCH v2 1/2] btrfs: rename delete_unused_bgs_mutex Johannes Thumshirn
2021-03-19 17:49 ` Josef Bacik
2021-03-23 6:25 ` Anand Jain
2021-03-19 10:48 ` [PATCH v2 2/2] btrfs: zoned: automatically reclaim zones Johannes Thumshirn
2021-03-19 17:59 ` Josef Bacik
2021-03-23 7:11 ` Naohiro Aota
2021-04-07 11:30 ` Johannes Thumshirn
2021-03-23 6:45 ` Anand Jain
2021-04-07 11:29 ` Johannes Thumshirn [this message]
2021-03-23 9:57 ` Filipe Manana
2021-03-23 10:22 ` Johannes Thumshirn
2021-03-25 10:28 ` Johannes Thumshirn
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=SA0PR04MB74181910EBE1A9DF746FB2E69B759@SA0PR04MB7418.namprd04.prod.outlook.com \
--to=johannes.thumshirn@wdc.com \
--cc=Naohiro.Aota@wdc.com \
--cc=anand.jain@oracle.com \
--cc=dsterba@suse.com \
--cc=fdmanana@suse.com \
--cc=josef@toxicpanda.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.