From patchwork Thu Sep 30 03:48:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shi Lei X-Patchwork-Id: 12527219 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EFC0C433F5 for ; Thu, 30 Sep 2021 03:52:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 591666187F for ; Thu, 30 Sep 2021 03:52:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 591666187F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=massclouds.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id B411C940080; Wed, 29 Sep 2021 23:52:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AF17794003A; Wed, 29 Sep 2021 23:52:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9DFD4940080; Wed, 29 Sep 2021 23:52:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0210.hostedemail.com [216.40.44.210]) by kanga.kvack.org (Postfix) with ESMTP id 8E05494003A for ; Wed, 29 Sep 2021 23:52:11 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 3F7C08249980 for ; Thu, 30 Sep 2021 03:52:11 +0000 (UTC) X-FDA: 78642866862.01.4DF9114 Received: from m97136.mail.qiye.163.com (m97136.mail.qiye.163.com [220.181.97.136]) by imf23.hostedemail.com (Postfix) with ESMTP id D28E69000395 for ; Thu, 30 Sep 2021 03:52:09 +0000 (UTC) Received: from localhost.localdomain (unknown [58.56.27.130]) by smtp2 (Coremail) with SMTP id iOCowAD3WgVbNFVhNQyaAw--.22799S2; Thu, 30 Sep 2021 11:51:56 +0800 (CST) From: Shi Lei To: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Shi Lei Subject: [PATCH] mm: remove useless lines in enable_cpucache() Date: Thu, 30 Sep 2021 11:48:45 +0800 Message-Id: <20210930034845.2539-1-shi_lei@massclouds.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: iOCowAD3WgVbNFVhNQyaAw--.22799S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjfUBwF4DUUUU X-Originating-IP: [58.56.27.130] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbiVRweT1f4pxhyDAAAs2 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: D28E69000395 X-Stat-Signature: wfapurrm11t74yyqikio9o5ayxj7wtrn Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=none; spf=none (imf23.hostedemail.com: domain of shi_lei@massclouds.com has no SPF policy when checking 220.181.97.136) smtp.mailfrom=shi_lei@massclouds.com X-HE-Tag: 1632973929-230582 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: These lines are useless, so remove them. Signed-off-by: Shi Lei Reviewed-by: Vlastimil Babka Acked-by: David Rientjes --- mm/slab.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/slab.c b/mm/slab.c index 4d826394ffcb..01775fe0e002 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3900,8 +3900,6 @@ static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp) if (err) goto end; - if (limit && shared && batchcount) - goto skip_setup; /* * The head array serves three purposes: * - create a LIFO ordering, i.e. return objects that are cache-warm @@ -3944,7 +3942,6 @@ static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp) limit = 32; #endif batchcount = (limit + 1) / 2; -skip_setup: err = do_tune_cpucache(cachep, limit, batchcount, shared, gfp); end: if (err)