All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: David Sterba <dsterba@suse.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	Filipe Manana <fdmanana@suse.com>,
	Naohiro Aota <Naohiro.Aota@wdc.com>
Subject: Re: [PATCH] btrfs: zoned: exclude relocation and page writeback
Date: Thu, 12 Aug 2021 16:50:18 +0200	[thread overview]
Message-ID: <20210812145017.GJ5047@suse.cz> (raw)
In-Reply-To: <PH0PR04MB7416785CF79EF72CCDCF931E9BF99@PH0PR04MB7416.namprd04.prod.outlook.com>

On Thu, Aug 12, 2021 at 02:40:59PM +0000, Johannes Thumshirn wrote:
> On 12/08/2021 16:28, David Sterba wrote:
> > That's a lot of new bytes for an inode, and just for zoned mode. Is
> > there another way how to synchronize that? Like some inode state bit and
> > then waiting on it, using the generic wait queues and API like
> > wait_var_event?
> 
> I can look into that yes.
> 
> Filipe originally suggested using the inode_lock() which would avoid the
> new mutex as well. I went away from using the inode_lock() mainly for 
> documentation purposes but I can call btrfs_inode_lock() from 
> btrfs_zoned_relocation_io_lock() as well.
> 
> I'll try implementing #1 and if that fails see if #2 is usable.
> 
> The longer alternative that Naohiro and Damien also suggested is avoiding
> zone append on relocation and running a block group that is a target for 
> relocation at QD=1 but that is way more intrusive and not a good candidate
> for stable IMHO.

The zoned mode still gets improved in each version so we might not limit
ourselves by backportability of the fix. 5.12 is not updated anymore and
that's the lowest version we care about regardind zoned mode.

We could perhaps have first "heavy" solution like the mutex backported
to 5.13/5.14 as that we'll probably use as testing base for some time.
In the long term I'd rather have something that looks lighter, but I
haven't analyzed the bug nor the solutions very closely so can't say
which one is the best.

  reply	other threads:[~2021-08-12 14:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 13:53 [PATCH] btrfs: zoned: exclude relocation and page writeback Johannes Thumshirn
2021-08-12 14:25 ` David Sterba
2021-08-12 14:40   ` Johannes Thumshirn
2021-08-12 14:50     ` David Sterba [this message]
2021-08-17 14:21       ` Johannes Thumshirn
2021-08-18  9:36         ` David Sterba
2021-08-18  9:55           ` 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=20210812145017.GJ5047@suse.cz \
    --to=dsterba@suse.cz \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=Naohiro.Aota@wdc.com \
    --cc=dsterba@suse.com \
    --cc=fdmanana@suse.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.