public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: JunChao Sun <sunjunchao2870@gmail.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu,
	adilger.kernel@dilger.ca, jack@suse.cz
Subject: Re: [PATCH] ext4: replace kmem_cache_create with KMEM_CACHE
Date: Wed, 9 Nov 2022 18:47:34 -0800	[thread overview]
Message-ID: <Y2xmRmGY7lfg/sbt@sol.localdomain> (raw)
In-Reply-To: <CAHB1NaidN+FquNh2z-UXW8cycM-X5h+6T=XX=fEFyt2VkwXGvw@mail.gmail.com>

On Thu, Nov 10, 2022 at 08:53:26AM +0800, JunChao Sun wrote:
> Yeah, maybe we should remove the SLAB_RECLAIM_ACCOUNT flag for static
> slab, and 16828088f9e51815 ("ext4: use KMEM_CACHE instead of
> kmem_cache_create") have done so. But should we remove
> SLAB_RECLAIM_ACCOUNT in this patch or belong to a separate patch?

I'd just keep the slab flags the same in this patch.  If any flags do need to be
changed, that should be a separate patch.

I think SLAB_RECLAIM_ACCOUNT is meant for for things that are directly
reclaimable, such as struct ext4_inode_info.  Inodes are evictable, and when
that happens, the corresponding struct ext4_inode_info gets freed.

bio_post_read_ctx_cache probably should use SLAB_TEMPORARY instead, since it is
only used for temporary structures during I/O.

That being said, SLAB_TEMPORARY is currently #define'd to SLAB_RECLAIM_ACCOUNT,
so currently it makes no difference in practice...

- Eric

  reply	other threads:[~2022-11-10  2:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 15:38 [PATCH] ext4: replace kmem_cache_create with KMEM_CACHE JunChao Sun
2022-11-09 15:49 ` Jan Kara
2022-11-09 18:00 ` Eric Biggers
2022-11-10  0:53   ` JunChao Sun
2022-11-10  2:47     ` Eric Biggers [this message]
2022-11-10  3:44       ` JunChao Sun
2022-11-11 23:42       ` JunChao Sun

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=Y2xmRmGY7lfg/sbt@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=adilger.kernel@dilger.ca \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sunjunchao2870@gmail.com \
    --cc=tytso@mit.edu \
    /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