linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hyeonggon Yoo <42.hyeyoo@gmail.com>
To: JaeSang Yoo <js.yoo.5b@gmail.com>
Cc: Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Ohhoon Kwon <ohkwon1043@gmail.com>,
	Wonhyuk Yang <vvghjk1234@gmail.com>,
	Jiyoup Kim <lakroforce@gmail.com>,
	Donghyeok Kim <dthex5d@gmail.com>,
	JaeSang Yoo <jsyoo5b@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/slub: remove meaningless node check in ___slab_alloc()
Date: Sun, 10 Apr 2022 16:14:38 +0900	[thread overview]
Message-ID: <YlKD3oz3HqQnucyc@hyeyoo> (raw)
In-Reply-To: <20220409144239.2649257-1-jsyoo5b@gmail.com>

On Sat, Apr 09, 2022 at 11:42:39PM +0900, JaeSang Yoo wrote:
> node_match() with node=NUMA_NO_NODE always returns 1.
> Duplicate check by goto statement is meaningless. Remove it.

Yeah, I think node = NUMA_NO_NODE here is to remove constraints
when later calling get_partial_node() or new_slab().

So no further check is required.

> 
> Signed-off-by: JaeSang Yoo <jsyoo5b@gmail.com>
> ---
>  mm/slub.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/mm/slub.c b/mm/slub.c
> index 9fe000fd19ca..a65e282b8238 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -2913,7 +2913,6 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
>  		 */
>  		if (!node_isset(node, slab_nodes)) {
>  			node = NUMA_NO_NODE;
> -			goto redo;
>  		} else {
>  			stat(s, ALLOC_NODE_MISMATCH);
>  			goto deactivate_slab;
> -- 
> 2.25.1

Looks good to me.

Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>

Thanks!

> 
> 

-- 
Thanks,
Hyeonggon

  reply	other threads:[~2022-04-10  7:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-09 14:42 [PATCH] mm/slub: remove meaningless node check in ___slab_alloc() JaeSang Yoo
2022-04-10  7:14 ` Hyeonggon Yoo [this message]
2022-04-11  3:50 ` Muchun Song
2022-04-11 10:38 ` Vlastimil Babka
2022-04-12 23:39 ` 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=YlKD3oz3HqQnucyc@hyeyoo \
    --to=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=dthex5d@gmail.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=js.yoo.5b@gmail.com \
    --cc=jsyoo5b@gmail.com \
    --cc=lakroforce@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ohkwon1043@gmail.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@suse.cz \
    --cc=vvghjk1234@gmail.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;
as well as URLs for NNTP newsgroup(s).