Re: [PATCH v3] mm/slub: Genericize x86-specific cmpxchg16b comment

From: Vlastimil Babka (SUSE)

Date: Wed Nov 11 2026 - 03:48:42 EST


On 11/11/26 02:11, Tiezhu Yang wrote:
> In __kmalloc_nolock_noprof(), update the comment from x86-specific
> "cmpxchg16b" to generic "double-width atomic cmpxchg".
>
> Suggested-by: Harry Yoo <harry@xxxxxxxxxx>
> Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>

Acked-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>


> ---
> v3:
> - add missing Suggested-by tag for Harry
> - use shorter commit message as requested
>
> mm/slub.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/slub.c b/mm/slub.c
> index 45e077c7526c..090302f1daeb 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -5589,8 +5589,8 @@ static void *__kmalloc_nolock_noprof(DECL_TOKEN_PARAMS(size, token), gfp_t gfp_f
> if (!(s->flags & __CMPXCHG_DOUBLE) && !kmem_cache_debug(s))
> /*
> * kmalloc_nolock() is not supported on architectures that
> - * don't implement cmpxchg16b and thus need slab_lock()
> - * which could be preempted by a nmi.
> + * don't implement double-width atomic cmpxchg and thus need
> + * slab_lock() which could be preempted by a nmi.
> * But debug caches don't use that and only rely on
> * kmem_cache_node->list_lock, so kmalloc_nolock() can attempt
> * to allocate from debug caches by