From: Christoph Hellwig <hch@infradead.org>
To: Qu Wenruo <wqu@suse.com>
Cc: Anand Jain <anand.jain@oracle.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/3] btrfs: small improvement for btrfs_io_context structure
Date: Thu, 2 Feb 2023 22:19:37 -0800 [thread overview]
Message-ID: <Y9yneQhuePjT/92P@infradead.org> (raw)
In-Reply-To: <61d2d841-778b-ca13-cc41-ca115b5ed287@suse.com>
On Thu, Feb 02, 2023 at 02:47:13PM +0800, Qu Wenruo wrote:
> Because the tgtdev_map would soon get completely removed in the next patch.
>
> Just to mention, I don't like the current way to allocate memory at all.
>
> If there is more feedback, I can convert the allocation to the same way as
> alloc_rbio() of raid56.c, AKA, use dedicated kcalloc() calls for those
> arrays.
The real elephant in the room is that the io_context needs to use a
mempool anyway to be deadlock safe. Which means we'll need to size
for the worst case (per file system?) here. Fortunately the read
fast path now doesn't use the io_context at all which helps with
the different sizing optimizations.
next prev parent reply other threads:[~2023-02-03 6:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-28 8:23 [PATCH 0/3] btrfs: reduce the memory usage for replace in btrfs_io_context Qu Wenruo
2023-01-28 8:23 ` [PATCH 1/3] btrfs: simplify the @bioc argument for handle_ops_on_dev_replace() Qu Wenruo
2023-01-30 7:17 ` Johannes Thumshirn
2023-01-31 11:54 ` Anand Jain
2023-01-28 8:23 ` [PATCH 2/3] btrfs: small improvement for btrfs_io_context structure Qu Wenruo
2023-01-30 7:27 ` Johannes Thumshirn
2023-01-30 7:31 ` Qu Wenruo
2023-02-02 6:28 ` Anand Jain
2023-02-02 6:47 ` Qu Wenruo
2023-02-02 9:12 ` Anand Jain
2023-02-07 2:19 ` Qu Wenruo
2023-02-03 6:19 ` Christoph Hellwig [this message]
2023-02-03 6:44 ` Qu Wenruo
2023-01-28 8:23 ` [PATCH 3/3] btrfs: use a more space efficient way to represent the source of duplicated stripes Qu Wenruo
2023-01-30 7:40 ` 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=Y9yneQhuePjT/92P@infradead.org \
--to=hch@infradead.org \
--cc=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.com \
/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