diff options
author | Andrey Konovalov <andreyknvl@google.com> | 2022-04-28 17:59:40 +0200 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2022-05-02 10:47:25 +0200 |
commit | 154036a3b3f39cb17fc65511011f4c4024846e91 (patch) | |
tree | 4148b1e6cef16ab9522b01cfa26505c37c177587 /mm/slub.c | |
parent | 8cf9e1210adf49cd83d11e2b1984540cf0e0be71 (diff) |
mm: slab: fix comment for __assume_kmalloc_alignment
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>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Link: https://lore.kernel.org/r/84d8142747230f2015eaf9705ee7c2e1a9f56596.1651161548.git.andreyknvl@google.com
Diffstat (limited to 'mm/slub.c')
0 files changed, 0 insertions, 0 deletions