public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Kunwu Chan <chentao@kylinos.cn>
Cc: chandan.babu@oracle.com, djwong@kernel.org,
	linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xfs: Simplify the allocation of slab caches in xfs_rmap_intent_init_cache
Date: Mon, 5 Feb 2024 21:07:41 +1100	[thread overview]
Message-ID: <ZcCzbZDvBkCDyUIR@dread.disaster.area> (raw)
In-Reply-To: <20240205081227.434198-1-chentao@kylinos.cn>

On Mon, Feb 05, 2024 at 04:12:27PM +0800, Kunwu Chan wrote:
> Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
> to simplify the creation of SLAB caches.

What makes you think KMEM_CACHE is new? It was added to the kernel
in 2007 The vast majority of the kernel is still using
kmem_cache_create(), not the weird, shouty macro that doesn't
actually tell us what it is doing with said kmem_cache......

Up until now I've chosen not switch XFS to use it because many of
the slab caches we use in XFS are not just "default" slab caches.
IOWs, we still have to use kmem_cache_create() for a lot of the
caches we create, so we may as well use kmem_cache_create() for all of them
rather than have to go look up what KMEM_CACHE() translates to every
time we are looking at how slab caches are created.

Also, if you are going to change simple API stuff like this in XFS,
please do all the conversions in a single patch. It takes much less
time and resources to review and merge a single patch compared to a
couple of dozen independent one line patches...

-Dave.
-- 
Dave Chinner
david@fromorbit.com

      reply	other threads:[~2024-02-05 10:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05  8:12 [PATCH] xfs: Simplify the allocation of slab caches in xfs_rmap_intent_init_cache Kunwu Chan
2024-02-05 10:07 ` Dave Chinner [this message]

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=ZcCzbZDvBkCDyUIR@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=chandan.babu@oracle.com \
    --cc=chentao@kylinos.cn \
    --cc=djwong@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@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