linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Haifeng Xu <haifeng.xu@shopee.com>, cl@linux.com, willy@infradead.org
Cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com,
	akpm@linux-foundation.org, roman.gushchin@linux.dev,
	42.hyeyoo@gmail.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] slub: Set __GFP_COMP in kmem_cache by default
Date: Mon, 15 Apr 2024 16:52:01 +0200	[thread overview]
Message-ID: <652e9d20-07a9-44e6-abb6-c644f5f3e996@suse.cz> (raw)
In-Reply-To: <20240413155603.617554-1-haifeng.xu@shopee.com>

On 4/13/24 5:56 PM, Haifeng Xu wrote:
> Now the __GFP_COMP is set only if the higher-order is not 0. However,
> __GFP_COMP flag can be set unconditionally because compound page can
> not be created in the order-0 case. And this can also simplify the code
> a bit (no need to check the order is 0 or not).
> 
> Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>

Thanks, added to slab/for-next

> ---
>  mm/slub.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/mm/slub.c b/mm/slub.c
> index e7bf1a1a31a8..49a3ebefab86 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -4461,9 +4461,7 @@ static int calculate_sizes(struct kmem_cache *s)
>  	if ((int)order < 0)
>  		return 0;
>  
> -	s->allocflags = 0;
> -	if (order)
> -		s->allocflags |= __GFP_COMP;
> +	s->allocflags = __GFP_COMP;
>  
>  	if (s->flags & SLAB_CACHE_DMA)
>  		s->allocflags |= GFP_DMA;



      reply	other threads:[~2024-04-15 14:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-13 15:56 Haifeng Xu
2024-04-15 14:52 ` 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=652e9d20-07a9-44e6-abb6-c644f5f3e996@suse.cz \
    --to=vbabka@suse.cz \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=haifeng.xu@shopee.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=willy@infradead.org \
    /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