From patchwork Fri Nov 5 20:35:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12605385 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 F0532C433EF for ; Fri, 5 Nov 2021 20:35:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9263A61252 for ; Fri, 5 Nov 2021 20:35:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9263A61252 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 39FD894000C; Fri, 5 Nov 2021 16:35:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 34F8A94000D; Fri, 5 Nov 2021 16:35:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 23EBF94000C; Fri, 5 Nov 2021 16:35:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0161.hostedemail.com [216.40.44.161]) by kanga.kvack.org (Postfix) with ESMTP id 1300594000D for ; Fri, 5 Nov 2021 16:35:13 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id BBB4882499A8 for ; Fri, 5 Nov 2021 20:35:12 +0000 (UTC) X-FDA: 78776031180.19.9362CA7 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf10.hostedemail.com (Postfix) with ESMTP id E099E60019B0 for ; Fri, 5 Nov 2021 20:35:00 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 5E2A46125F; Fri, 5 Nov 2021 20:35:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1636144511; bh=DCh7yJy6z4y7qRQcZROwHfmik69LdedH9RpmhvtpYrE=; h=Date:From:To:Subject:In-Reply-To:From; b=EDyQkK1xNAfJDzrAKp3XAnJgA9PLBfou5PIVij6W6cAn134gCZrfJRGgw2/o5+c6b BMYx0DNHD94rH6XbS9o7Cau55JjY3YvkmlTzyft3W8cHK+txx9Suf8E74YW9XG6aYZ NIUn9MQzhhMrlBwntJTW+QyG4hYorWPB2pSGFLag= Date: Fri, 05 Nov 2021 13:35:10 -0700 From: Andrew Morton To: akpm@linux-foundation.org, cl@linux.com, iamjoonsoo.kim@lge.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, penberg@kernel.org, rientjes@google.com, shi_lei@massclouds.com, torvalds@linux-foundation.org, vbabka@suse.cz Subject: [patch 012/262] mm/slab.c: remove useless lines in enable_cpucache() Message-ID: <20211105203510.kUPi_1np4%akpm@linux-foundation.org> In-Reply-To: <20211105133408.cccbb98b71a77d5e8430aba1@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: E099E60019B0 X-Stat-Signature: yfe35smq5p8bkyycwqnapbe6funfj7og Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=EDyQkK1x; spf=pass (imf10.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1636144500-755956 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: From: Shi Lei Subject: mm/slab.c: remove useless lines in enable_cpucache() These lines are useless, so remove them. Link: https://lkml.kernel.org/r/20210930034845.2539-1-shi_lei@massclouds.com Fixes: 10befea91b61 ("mm: memcg/slab: use a single set of kmem_caches for all allocations") Signed-off-by: Shi Lei Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Signed-off-by: Andrew Morton --- mm/slab.c | 3 --- 1 file changed, 3 deletions(-) --- a/mm/slab.c~mm-remove-useless-lines-in-enable_cpucache +++ a/mm/slab.c @@ -3900,8 +3900,6 @@ static int enable_cpucache(struct kmem_c 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_c limit = 32; #endif batchcount = (limit + 1) / 2; -skip_setup: err = do_tune_cpucache(cachep, limit, batchcount, shared, gfp); end: if (err)