lkml.org 
[lkml]   [2022]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] mm: slab: fix comment for __assume_kmalloc_alignment
On Thu, 28 Apr 2022, andrey.konovalov@linux.dev wrote:

> From: Andrey Konovalov <andreyknvl@google.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@google.com>

Acked-by: David Rientjes <rientjes@google.com>

\
 
 \ /
  Last update: 2022-05-02 02:15    [W:0.067 / U:1.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site