All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: Damien Le Moal <Damien.LeMoal@wdc.com>,
	"dsterba@suse.cz" <dsterba@suse.cz>
Cc: David Sterba <dsterba@suse.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	Naohiro Aota <Naohiro.Aota@wdc.com>
Subject: Re: [PATCH] btrfs: zoned: limit ordered extent to zoned append size
Date: Tue, 25 May 2021 09:40:22 +0000	[thread overview]
Message-ID: <PH0PR04MB7416299E1493D6A243375B9F9B259@PH0PR04MB7416.namprd04.prod.outlook.com> (raw)
In-Reply-To: DM6PR04MB7081AF42EBA082FD09A07BD5E7279@DM6PR04MB7081.namprd04.prod.outlook.com

On 24/05/2021 01:05, Damien Le Moal wrote: 
>>> +	if (fs_info && fs_info->max_zone_append_size)
>>> +		max_bytes = ALIGN_DOWN(fs_info->max_zone_append_size,
>>> +				       PAGE_SIZE);
>>
>> Why is the alignment needed? Are the max zone append values expected to
>> be so random? Also it's using memory-related value for something that's
>> more hw related, or at least extent size (which ends up on disk).

I did the ALIGN_DOWN() call because we want to have complete pages added.

> It is similar to max_hw_sectors: the hardware decides what the value is. So we
> cannot assume anything about what max_zone_append_size is.
> 
> I think that Johannes patch here limits the extent size to the HW value to avoid
> having to split the extent later one. That is efficient but indeed is a bit of a
> layering violation here.

Damien just brought up a good idea: what about a function to lookup the max extent
size depending on the block group. For regular btrfs it'll for now just return 
BTRFS_MAX_EXTENT_SIZE, for zoned btrfs it'll return 
ALIGN_DOWN(fs_info->max_zone_append_size, PAGE_SIZE) and it also gives us some 
headroom for future improvements in this area.


  reply	other threads:[~2021-05-25  9:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21  9:11 [PATCH] btrfs: zoned: limit ordered extent to zoned append size Johannes Thumshirn
2021-05-21  9:46 ` Damien Le Moal
2021-05-21  9:52   ` Johannes Thumshirn
2021-05-21 16:37 ` David Sterba
2021-05-23 23:05   ` Damien Le Moal
2021-05-25  9:40     ` Johannes Thumshirn [this message]
2021-05-31 19:02       ` David Sterba
2021-05-31 18:58 ` David Sterba
2021-06-01  7:44   ` Johannes Thumshirn
2021-06-01 18:58     ` David Sterba

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=PH0PR04MB7416299E1493D6A243375B9F9B259@PH0PR04MB7416.namprd04.prod.outlook.com \
    --to=johannes.thumshirn@wdc.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=Naohiro.Aota@wdc.com \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --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.