From patchwork Sat Apr 9 14:42:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: JaeSang Yoo X-Patchwork-Id: 12807962 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97492C433F5 for ; Sat, 9 Apr 2022 14:42:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 17EC96B0071; Sat, 9 Apr 2022 10:42:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 109206B0073; Sat, 9 Apr 2022 10:42:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EEA406B0074; Sat, 9 Apr 2022 10:42:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id DAE3C6B0071 for ; Sat, 9 Apr 2022 10:42:56 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 9672C20A69 for ; Sat, 9 Apr 2022 14:42:56 +0000 (UTC) X-FDA: 79337607552.13.2FD5DFB Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by imf07.hostedemail.com (Postfix) with ESMTP id 1D3874000A for ; Sat, 9 Apr 2022 14:42:55 +0000 (UTC) Received: by mail-pj1-f46.google.com with SMTP id e8-20020a17090a118800b001cb13402ea2so7834951pja.0 for ; Sat, 09 Apr 2022 07:42:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vl38/Gn1Ja/tfx1OE95rZjNeXGNT1OOD4zzjhjOONik=; b=K1WsvwuoCpAIHJWhA/t7k/ll20oJIFxUcaj9+xFS8rndq8lbEQnGLMXJKZM92HJ5AG iYR9vg9r170/BRZdFbYm/E9/61C8iwLGhVZYfL7acFA+08b7E3iHtHQFDIYuwunVOt9H D5St9/4uIf3Fjdura6SkBzwY3HJ9jNvDI70sKSbT7ICPZdJoL2SIBSGDMbqzhlDMato+ gE0osfNBgJ7tDoSm7Yt3hETKG4VlH4CRVtImaL+hqCBFxESMw2oGY6U4bI/cJbWAjlPK blbZE2zVGlRNrllye2MBu16e8vHPCTOxXxY4+/c4VcMeif9zdMBEm8cBhWYG8rEEfiz6 AJPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vl38/Gn1Ja/tfx1OE95rZjNeXGNT1OOD4zzjhjOONik=; b=skuSnGuEi3wxIYLOq2AEWk/oRuBCe6nmuQT9lH2r19icugp9U5tjC8XrO7k+Ufq+oE TQueeJAKeL5h56gabUl1qz1o74e7K4TEugsnVTMdDuXG9E3lt8+ycUOkag3zVPXslfe0 8QWMUv7T/Og4tlAPBlVefXHAoaHj0U51pfy+ik/52V0uWTuEPWUwd3qNXlRt8SbtrIY4 DzvpShLyhEO+UE2zJfmt71MFQ3kUUuJdNc9KJD91GpGff3f3vKRSxSiRryZ7L77dXSpl hkI99uJ8G8sTCrtYG6lF/OhcF0tt9z9gqIIX5gHllDhiDe0kTNkKHwnyVDGnBSRD3O9f LpjQ== X-Gm-Message-State: AOAM531l8LSbsf9lwKg0qltRjil2CpwHERuCYgqj5+bqh4uwgCL066Nr OwbKdpd0bHWaZHjCjtmoMA== X-Google-Smtp-Source: ABdhPJzxdWFiiA50vM0YwFC3qcQrpLR0x4AQV9NPemYyBGaoQaD8ChdalwfSOXfyP27GkjMl8dt8Uw== X-Received: by 2002:a17:90b:1bc8:b0:1c7:443:3ffb with SMTP id oa8-20020a17090b1bc800b001c704433ffbmr26976623pjb.84.1649515374917; Sat, 09 Apr 2022 07:42:54 -0700 (PDT) Received: from localhost.localdomain ([121.165.123.189]) by smtp.gmail.com with ESMTPSA id q5-20020a17090a68c500b001cb651fffdbsm2218373pjj.8.2022.04.09.07.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Apr 2022 07:42:54 -0700 (PDT) From: JaeSang Yoo X-Google-Original-From: JaeSang Yoo To: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin Cc: Ohhoon Kwon , Wonhyuk Yang , Jiyoup Kim , Donghyeok Kim , JaeSang Yoo , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm/slub: remove meaningless node check in ___slab_alloc() Date: Sat, 9 Apr 2022 23:42:39 +0900 Message-Id: <20220409144239.2649257-1-jsyoo5b@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: bxbu6n1hqo6b9q5965e96zbd4ztqa1fe Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=K1Wsvwuo; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf07.hostedemail.com: domain of js.yoo.5b@gmail.com designates 209.85.216.46 as permitted sender) smtp.mailfrom=js.yoo.5b@gmail.com X-Rspamd-Queue-Id: 1D3874000A X-HE-Tag: 1649515375-868827 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: node_match() with node=NUMA_NO_NODE always returns 1. Duplicate check by goto statement is meaningless. Remove it. Signed-off-by: JaeSang Yoo Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Muchun Song Acked-by: David Rientjes --- 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;