[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fad4a239-c2bc-33ee-ca2e-f1f1cd6a5d79@google.com>
Date: Sun, 1 May 2022 17:13:22 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: andrey.konovalov@...ux.dev
cc: Andrew Morton <akpm@...ux-foundation.org>,
Andrey Konovalov <andreyknvl@...il.com>,
Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Vlastimil Babka <vbabka@...e.cz>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Peter Collingbourne <pcc@...gle.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Andrey Konovalov <andreyknvl@...gle.com>
Subject: Re: [PATCH 2/2] mm: slab: fix comment for
__assume_kmalloc_alignment
On Thu, 28 Apr 2022, andrey.konovalov@...ux.dev wrote:
> From: Andrey Konovalov <andreyknvl@...gle.com>
>
> The comment next to the __assume_kmalloc_alignment definition is not
> precise: kmalloc relies on kmem_cache_alloc, so kmalloc technically returns
> pointers aligned to both ARCH_KMALLOC_MINALIGN and ARCH_SLAB_MINALIGN,
> not only to ARCH_KMALLOC_MINALIGN.
>
> (See create_kmalloc_cache()->create_boot_cache()->calculate_alignment()
> for SLAB and SLUB and __do_kmalloc_node() for SLOB.)
>
> Clarify the comment.
>
> The assumption specified by __assume_kmalloc_alignment is still correct,
> although it can be made stronger. I'll leave this to a separate patch.
>
> Signed-off-by: Andrey Konovalov <andreyknvl@...gle.com>
Acked-by: David Rientjes <rientjes@...gle.com>
Powered by blists - more mailing lists