linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
	Peter Collingbourne <pcc@google.com>,
	Petr Tesarik <petr.tesarik.ext@huawei.com>
Subject: Re: [RESEND PATCH] mm: slab: Do not create kmalloc caches smaller than arch_slab_minalign()
Date: Wed, 11 Oct 2023 15:31:50 +0200	[thread overview]
Message-ID: <e20542ca-3150-e281-b677-f6f6532d8181@suse.cz> (raw)
In-Reply-To: <ZSPiAE6c4rzhilRy@arm.com>

On 10/9/23 13:20, Catalin Marinas wrote:
>> >  mm/slab_common.c | 7 +++++--
>> >  1 file changed, 5 insertions(+), 2 deletions(-)
>> > 
>> > diff --git a/mm/slab_common.c b/mm/slab_common.c
>> > index cd71f9581e67..8b45922ed295 100644
>> > --- a/mm/slab_common.c
>> > +++ b/mm/slab_common.c
>> > @@ -895,10 +895,13 @@ void __init setup_kmalloc_cache_index_table(void)
>> >  
>> >  static unsigned int __kmalloc_minalign(void)
>> >  {
>> > +	unsigned int minalign = dma_get_cache_alignment();
>> > +
>> >  	if (IS_ENABLED(CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC) &&
>> >  	    is_swiotlb_allocated())
>> > -		return ARCH_KMALLOC_MINALIGN;
>> > -	return dma_get_cache_alignment();
>> > +		minalign = ARCH_KMALLOC_MINALIGN;
>> > +
>> > +	return ALIGN(minalign, arch_slab_minalign());
>> 
>> Could it be max() instead of ALIGN()? It would be more obvious, at least to
>> me :)
> 
> Yeah, max() would do since they are all a power of two. Do you want me
> to repost?

No need, picked up and changed locally. Thanks!




      reply	other threads:[~2023-10-11 13:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-06 16:39 Catalin Marinas
2023-10-09  8:22 ` Vlastimil Babka
2023-10-09 11:20   ` Catalin Marinas
2023-10-11 13:31     ` Vlastimil Babka [this message]

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=e20542ca-3150-e281-b677-f6f6532d8181@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mark.rutland@arm.com \
    --cc=pcc@google.com \
    --cc=petr.tesarik.ext@huawei.com \
    /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