Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp834167pxb; Tue, 12 Apr 2022 14:46:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPrluQmT5loaKyZ2FYEdQ83k47wCVAM0bcPG8nqDrKsf+sBFu4gKhcCFRn2malFeKvQwUl X-Received: by 2002:a63:7d4a:0:b0:398:dad:6963 with SMTP id m10-20020a637d4a000000b003980dad6963mr31818098pgn.329.1649800010435; Tue, 12 Apr 2022 14:46:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649800010; cv=none; d=google.com; s=arc-20160816; b=n26Fj5csK65KFDxz2oxONlyPDaz0mhrtmHrnKfeRVvYnv6IxGNp46/SdF1Uyu71IeX Wv3F3odH2X4jddlEJNbo93GjYBti4fm3r6WHuqNIdTlR9aCTZ7J/uYFXjUyKcF+8Cnx/ ozuyhJVyOR8ltsp57cfdLPbVswHH1bTyTg1e5gRfbUwWDTdlFf3AR50lx0AWjXU73n61 G4dTqdf38ZzIEsUNKGmPmLx5BkMQFhTfKe48RiGHmKHOlLbCzo7tiTg+6B7AAclmIW/b P/oZbZxH6BaRDxVapdDOT6E/4OjLKYa9VuEDzmooOH5dDjN8NjRU9iqyo46Ons/bQEcR QXUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PMY5eIllAtYW0O4Krr8r6TdMFoC/4GNbntYNUsV7TDM=; b=ogLcyMIQhno2Td7jqLM+DOKBu2e9q7RfbLNbAAqCj83mOKrJshD2phdPn0bJJ1fDih Il26n0PcpNU0uiO2a+N2+0oBHQBo2JtNopGWasY4cCvvtf48AdaoCSNi0Fzw7YoQfi2V a4I8ucq4o0ZrRtPYww3O2V27cfKkLThGK3MS3IWY3lsHtFpVT16SZUNJSoSM7sXUylPg zxP2s0yZ41s3s9VDa+jZ5oPzPUt5U8MSZzdcmCgx8XiEqh9nro2G8zJC+ZIIEIqt7XiZ t2idRt9nP+oWhLW+3opqxf1xDEqDp/2uD3sqytB311LeqtX2FL3yGqNNgqh3MmMVTRfx nC6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pmJnpsJ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x3-20020a17090300c300b00153b2d16486si10857215plc.142.2022.04.12.14.46.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 14:46:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pmJnpsJ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A375E139CDC; Tue, 12 Apr 2022 13:46:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233847AbiDJHRB (ORCPT + 99 others); Sun, 10 Apr 2022 03:17:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233795AbiDJHQ6 (ORCPT ); Sun, 10 Apr 2022 03:16:58 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AA135D186 for ; Sun, 10 Apr 2022 00:14:49 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id mm4-20020a17090b358400b001cb93d8b137so136950pjb.2 for ; Sun, 10 Apr 2022 00:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=PMY5eIllAtYW0O4Krr8r6TdMFoC/4GNbntYNUsV7TDM=; b=pmJnpsJ5BKsfrji2xj06XksVesUPMK0FhCQ9OlttXfXl9J/RuqkX01pkBZcbhsB5IQ ICh+EVF8SoUt1+0bKuDFGxo5IrH6BTyRJ0Rmguz/fW5gjmsIaFvPV/TGuEK3k8Uv1Civ xO1W4AnOeFWBR/JOoL+RWSY7DJMRniBOAl+qD8zEEUfegepBvP0oDAc1uXJ2WabrAOg7 MropX/Jm3slB7HpWLL+TELBcfqYkzOJ7cTjIXwtcfxi1SWDufax+fPwfgTH/cAUJjrer JTC3NZ5/G0m2cZx3X2JdT7HV9mQpLnFUhIcN0mv7r5VcQIfGrH4RVHFTfiyH5Q1OPpY0 RAMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PMY5eIllAtYW0O4Krr8r6TdMFoC/4GNbntYNUsV7TDM=; b=LFHcl1SrPt52keSutz4JgpaN+Zy3dGvBpgIMWMEU9Kc3ZZCDeGOGqpOsSvcXs9mioi XHxDUfoHokQ7w4JX/J3omCaT+vjyO0OcfB68Px9+xU11vHeGwGo6cgIWVtatwKP4QKCv WvFiUCNdXDGotglS+CGusD6+xOJirT5yji9PMRMTz7uZ9tF8MaVmqY+uw31cjPXzGf2R w7Vp9r8HP1gPjNREF5m/e9ATCM6Fm55G7Yge97ITPqy3DU6Idm2vROBe9CudoUlXKtZy IJYdP4MpqYtF0guDD51QlyAyDIiuUJFKJol6myU5ze5nEAR+2ZVABDOTUMfW4p9V2H8s t9ig== X-Gm-Message-State: AOAM533aDgrGbGa1wnE2HegFw3ZonOQAwd4LvZYPdYL0ofrvXm12EO7z rj9DFzZgJnoOoRrzB4jHuMY= X-Received: by 2002:a17:902:7447:b0:158:2662:b8e2 with SMTP id e7-20020a170902744700b001582662b8e2mr9795761plt.54.1649574888369; Sun, 10 Apr 2022 00:14:48 -0700 (PDT) Received: from hyeyoo ([114.29.24.243]) by smtp.gmail.com with ESMTPSA id w123-20020a623081000000b005056a4d71e3sm10359056pfw.77.2022.04.10.00.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Apr 2022 00:14:47 -0700 (PDT) Date: Sun, 10 Apr 2022 16:14:38 +0900 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: JaeSang Yoo Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , Ohhoon Kwon , Wonhyuk Yang , Jiyoup Kim , Donghyeok Kim , JaeSang Yoo , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/slub: remove meaningless node check in ___slab_alloc() Message-ID: References: <20220409144239.2649257-1-jsyoo5b@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220409144239.2649257-1-jsyoo5b@gmail.com> X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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