All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: "dsterba@suse.cz" <dsterba@suse.cz>
Cc: David Sterba <dsterba@suse.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] btrfs: zoned: fix compressed writes
Date: Mon, 17 May 2021 09:20:28 +0000	[thread overview]
Message-ID: <PH0PR04MB74160EDEE8833D6027DC11AF9B2D9@PH0PR04MB7416.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20210517091237.GE7604@suse.cz

On 17/05/2021 11:15, David Sterba wrote:
> On Mon, May 17, 2021 at 07:07:04AM +0000, Johannes Thumshirn wrote:
>> On 12/05/2021 16:44, David Sterba wrote:
>>> On Wed, May 12, 2021 at 11:01:40PM +0900, Johannes Thumshirn wrote:
>>>> +	if (use_append) {
>>>> +		struct extent_map *em;
>>>> +		struct map_lookup *map;
>>>> +
>>>> +		em = btrfs_get_chunk_map(fs_info, disk_start, PAGE_SIZE);
>>>
>>> The caller already does the em lookup, so this is duplicate, allocating
>>> memory, taking locks and doing a tree lookup. All happening on write out
>>> path so this seems heavy.
>>
>> Right, I did not check this, sorry. Is it OK to add another patch as 
>> preparation swapping some of the parameters to btrfs_submit_compressed_write()
>> from the em?
> 
> That would be another prep patch for the fix, I can't say now if this
> would be still suitable for stable.
> 
>> Otherwise btrfs_submit_compressed_write() will have 10 parameters
>> which sounds awefull.
> 
> In case the fix would have to be in one patch, extending the parameters
> to 10 would be acceptable, if followed by reduction cleanup (that won't
> have to be backported).

OK, then I'll do that.

> If you check the only caller of btrfs_submit_compressed_write, four
> parameters are from async_extent, and two are async_chunk, where
> async_extent = list_entry(async_chunk->extents.next, ...) so that should
> be easy to reduce.
> 

Right 

  reply	other threads:[~2021-05-17  9:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12 14:01 [PATCH 0/2] btrfs: zoned: fix writes on a compressed zoned filesystem Johannes Thumshirn
2021-05-12 14:01 ` [PATCH 1/2] btrfs: zoned: pass start block to btrfs_use_zone_append Johannes Thumshirn
2021-05-12 14:01 ` [PATCH 2/2] btrfs: zoned: fix compressed writes Johannes Thumshirn
2021-05-12 14:42   ` David Sterba
2021-05-17  7:07     ` Johannes Thumshirn
2021-05-17  9:12       ` David Sterba
2021-05-17  9:20         ` Johannes Thumshirn [this message]
2021-05-17 11:21       ` Johannes Thumshirn
2021-05-17 11:39         ` 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=PH0PR04MB74160EDEE8833D6027DC11AF9B2D9@PH0PR04MB7416.namprd04.prod.outlook.com \
    --to=johannes.thumshirn@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.