All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Yoo <harry.yoo@oracle.com>
To: William Kucharski <william.kucharski@oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Christoph Lameter <cl@gentwo.org>,
	David Rientjes <rientjes@google.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Paul Mundt <lethal@linux-sh.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: Remove reference to destructor in comment in calculate_sizes()
Date: Tue, 21 Oct 2025 20:38:24 +0900	[thread overview]
Message-ID: <aPdwcpe91TkdPZ2V@hyeyoo> (raw)
In-Reply-To: <20251021110004.2209008-1-william.kucharski@oracle.com>

On Tue, Oct 21, 2025 at 05:00:04AM -0600, William Kucharski wrote:
> The commit that removed support for destructors from kmem_cache_alloc()
> never removed the comment regarding destructors in the explanation
> of the possible relocation of the free pointer in calculate_sizes().

Hi William,

I've been trying to reintroduce slab destructor (which hasn't been reposted
for a while...) [1]

[1] https://lore.kernel.org/linux-mm/20250424080755.272925-1-harry.yoo@oracle.com

I haven't had enough time to get back to it yet, but I haven't given up
on it either... so let us keep the comment? Otherwise I need add that
comment back as part of my series.

-- 
Cheers,
Harry / Hyeonggon

> Fixes: 20c2df83d25c ("mm: Remove slab destructors from kmem_cache_create().")


> Signed-off-by: William Kucharski <william.kucharski@oracle.com>
> ---
>  mm/slub.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/mm/slub.c b/mm/slub.c
> index a8fcc7e6f25a..09cbbe923a05 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -7875,11 +7875,11 @@ static int calculate_sizes(struct kmem_cache_args *args, struct kmem_cache *s)
>  		 * permitted to overwrite the first word of the object on
>  		 * kmem_cache_free.
>  		 *
> -		 * This is the case if we do RCU, have a constructor or
> -		 * destructor, are poisoning the objects, or are
> -		 * redzoning an object smaller than sizeof(void *) or are
> -		 * redzoning an object with slub_debug_orig_size() enabled,
> -		 * in which case the right redzone may be extended.
> +		 * This is the case if we do RCU, have a constructor, are
> +		 * poisoning the objects, or are redzoning an object smaller
> +		 * than sizeof(void *) or are redzoning an object with
> +		 * slub_debug_orig_size() enabled, in which case the right
> +		 * redzone may be extended.
>  		 *
>  		 * The assumption that s->offset >= s->inuse means free
>  		 * pointer is outside of the object is used in the


  reply	other threads:[~2025-10-21 11:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 11:00 [PATCH] mm: Remove reference to destructor in comment in calculate_sizes() William Kucharski
2025-10-21 11:38 ` Harry Yoo [this message]
2025-10-21 14:55 ` Roman Gushchin
2025-10-21 17:44 ` Christoph Lameter (Ampere)
2025-10-22  1:45 ` SeongJae Park

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=aPdwcpe91TkdPZ2V@hyeyoo \
    --to=harry.yoo@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@suse.cz \
    --cc=william.kucharski@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.