From: David Rientjes <rientjes@google.com>
To: andrey.konovalov@linux.dev
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andrey Konovalov <andreyknvl@gmail.com>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Vlastimil Babka <vbabka@suse.cz>,
Roman Gushchin <roman.gushchin@linux.dev>,
Peter Collingbourne <pcc@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrey Konovalov <andreyknvl@google.com>
Subject: Re: [PATCH 2/2] mm: slab: fix comment for __assume_kmalloc_alignment
Date: Sun, 1 May 2022 17:13:22 -0700 (PDT) [thread overview]
Message-ID: <fad4a239-c2bc-33ee-ca2e-f1f1cd6a5d79@google.com> (raw)
In-Reply-To: <84d8142747230f2015eaf9705ee7c2e1a9f56596.1651161548.git.andreyknvl@google.com>
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>
next prev parent reply other threads:[~2022-05-02 0:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-28 15:59 [PATCH 1/2] mm: slab: fix comment for ARCH_KMALLOC_MINALIGN andrey.konovalov
2022-04-28 15:59 ` [PATCH 2/2] mm: slab: fix comment for __assume_kmalloc_alignment andrey.konovalov
2022-05-02 0:13 ` David Rientjes [this message]
2022-04-29 7:32 ` [PATCH 1/2] mm: slab: fix comment for ARCH_KMALLOC_MINALIGN Christoph Lameter
2022-04-29 9:41 ` Vlastimil Babka
2022-05-02 0:13 ` David Rientjes
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=fad4a239-c2bc-33ee-ca2e-f1f1cd6a5d79@google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=andrey.konovalov@linux.dev \
--cc=andreyknvl@gmail.com \
--cc=andreyknvl@google.com \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pcc@google.com \
--cc=penberg@kernel.org \
--cc=roman.gushchin@linux.dev \
--cc=vbabka@suse.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox