linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Christoph Lameter (Ampere)" <cl@gentwo.org>
To: Yan Zhen <yanzhen@vivo.com>
Cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com,
	 akpm@linux-foundation.org, vbabka@suse.cz,
	roman.gushchin@linux.dev,  42.hyeyoo@gmail.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 opensource.kernel@vivo.com
Subject: Re: [PATCH v1] mm:slab:use kmem_cache_free() to free
Date: Thu, 22 Aug 2024 09:59:29 -0700 (PDT)	[thread overview]
Message-ID: <1bb9fcbc-310a-ad36-9e96-61dc80681f12@gentwo.org> (raw)
In-Reply-To: <20240822022704.1195439-1-yanzhen@vivo.com>

On Thu, 22 Aug 2024, Yan Zhen wrote:

> The kmem_cache_alloc() is typically used to free memory allocated through
> the kernel memory cache (slab allocator).

Well yes but since we removed SLOB we can use kfree() on any slab object.

> Using kmem_cache_free() for deallocation may be more reasonable.


It is more symmetric and looks better.

Reviewed-by: Christoph Lameter <cl@linux.com>


  reply	other threads:[~2024-08-22 17:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22  2:27 Yan Zhen
2024-08-22 16:59 ` Christoph Lameter (Ampere) [this message]
2024-08-27 14:49   ` Vlastimil Babka
2024-08-27 14:57     ` Vlastimil Babka
2024-08-27 15:54 ` [PATCH] mm: slab: use " Markus Elfring

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=1bb9fcbc-310a-ad36-9e96-61dc80681f12@gentwo.org \
    --to=cl@gentwo.org \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=opensource.kernel@vivo.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@suse.cz \
    --cc=yanzhen@vivo.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