From: David Sterba <dsterba@suse.cz>
To: fdmanana@kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 01/10] btrfs: use a kmem_cache for block groups
Date: Fri, 17 Apr 2026 03:51:11 +0200 [thread overview]
Message-ID: <20260417015111.GU12792@twin.jikos.cz> (raw)
In-Reply-To: <ccd87d11a25c4fc5c4a52869fd57994a96029307.1776278490.git.fdmanana@suse.com>
On Wed, Apr 15, 2026 at 07:44:39PM +0100, fdmanana@kernel.org wrote:
> --- a/fs/btrfs/block-group.c
> +++ b/fs/btrfs/block-group.c
> @@ -22,6 +22,23 @@
> #include "accessors.h"
> #include "extent-tree.h"
>
> +static struct kmem_cache *block_group_cache;
> +
> +int __init btrfs_init_block_group(void)
> +{
> + block_group_cache = kmem_cache_create("btrfs_block_group",
> + sizeof(struct btrfs_block_group),
In case the structure and cache name match you can use KMEM_CACHE.
> + 0, 0, NULL);
> + if (!block_group_cache)
> + return -ENOMEM;
> + return 0;
> +}
next prev parent reply other threads:[~2026-04-17 1:51 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 14:38 [PATCH 0/9] btrfs: reduce memory consumption for block groups fdmanana
2026-04-15 14:38 ` [PATCH 1/9] btrfs: use a kmem_cache " fdmanana
2026-04-15 14:38 ` [PATCH 2/9] btrfs: reduce size of struct btrfs_block_group fdmanana
2026-04-15 14:38 ` [PATCH 3/9] btrfs: use a kmem_cache for free space control structures fdmanana
2026-04-15 14:38 ` [PATCH 4/9] btrfs: remove start field from struct btrfs_free_space_ctl fdmanana
2026-04-15 14:38 ` [PATCH 5/9] btrfs: remove unit " fdmanana
2026-04-15 14:38 ` [PATCH 6/9] btrfs: reduce size of " fdmanana
2026-04-15 14:38 ` [PATCH 7/9] btrfs: remove block group argument from copy_free_space_cache() fdmanana
2026-04-15 14:38 ` [PATCH 8/9] btrfs: remove unnecessary ctl argument from __btrfs_write_out_cache() fdmanana
2026-04-15 14:38 ` [PATCH 9/9] btrfs: remove unnecessary ctl argument from write_cache_extent_entries() fdmanana
2026-04-15 18:44 ` [PATCH v2 00/10] btrfs: reduce memory consumption for block groups fdmanana
2026-04-15 18:44 ` [PATCH v2 01/10] btrfs: use a kmem_cache " fdmanana
2026-04-17 1:51 ` David Sterba [this message]
2026-04-15 18:44 ` [PATCH v2 02/10] btrfs: reduce size of struct btrfs_block_group fdmanana
2026-04-15 20:07 ` Martin Raiber
2026-04-16 10:30 ` Filipe Manana
2026-04-16 10:46 ` Martin Raiber
2026-04-17 2:09 ` David Sterba
2026-04-15 18:44 ` [PATCH v2 03/10] btrfs: use a kmem_cache for free space control structures fdmanana
2026-04-15 18:44 ` [PATCH v2 04/10] btrfs: remove start field from struct btrfs_free_space_ctl fdmanana
2026-04-15 18:44 ` [PATCH v2 05/10] btrfs: remove unit " fdmanana
2026-04-15 18:44 ` [PATCH v2 06/10] btrfs: reduce size of " fdmanana
2026-04-15 18:44 ` [PATCH v2 07/10] btrfs: remove op field from " fdmanana
2026-04-15 18:44 ` [PATCH v2 08/10] btrfs: remove block group argument from copy_free_space_cache() fdmanana
2026-04-15 18:44 ` [PATCH v2 09/10] btrfs: remove unnecessary ctl argument from __btrfs_write_out_cache() fdmanana
2026-04-15 18:44 ` [PATCH v2 10/10] btrfs: remove unnecessary ctl argument from write_cache_extent_entries() fdmanana
2026-04-17 2:16 ` [PATCH v2 00/10] btrfs: reduce memory consumption for block groups David Sterba
2026-04-17 7:54 ` Filipe Manana
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=20260417015111.GU12792@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=fdmanana@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox