From mboxrd@z Thu Jan 1 00:00:00 1970 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 F2829C433F5 for ; Thu, 30 Sep 2021 08:22:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8A9B3615E1 for ; Thu, 30 Sep 2021 08:22:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8A9B3615E1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 0E6D5940095; Thu, 30 Sep 2021 04:22:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 096F094003A; Thu, 30 Sep 2021 04:22:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EA091940095; Thu, 30 Sep 2021 04:22:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id D7D7C94003A for ; Thu, 30 Sep 2021 04:22:16 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 934F239476 for ; Thu, 30 Sep 2021 08:22:16 +0000 (UTC) X-FDA: 78643547472.14.D9C7B02 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf23.hostedemail.com (Postfix) with ESMTP id 1C64B9000395 for ; Thu, 30 Sep 2021 08:22:15 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id F0DDF1FE3A; Thu, 30 Sep 2021 08:22:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1632990134; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x2lV+mK2M7/NdUSiHiSSKoGAAQWF1PWc4g6uu1e2Vpk=; b=NmHM2p/H9RmlpIS4pPmVitWptYM1NJYJWjHCPiSwLS4Yz1/xD6urgKJZxoeEAj2cCpCC7q z0Ion9ov98vnSS0L2D3jl3NkgfBtCsude8gecww9rIKbnzE4TVFVIc4qAT3n3f6AEDZvA3 oA+nDgCJAgLg4jDXJFAy8jTChajF2Vg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1632990134; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x2lV+mK2M7/NdUSiHiSSKoGAAQWF1PWc4g6uu1e2Vpk=; b=lyV0YFiFjWMtwdsfSTlf+dynVDBJWSLoYopHvFyN6PNbxYVQ22fEYyRUc9GHQrKRJ1GLjL e8gkjrK3Q0Xqx3DQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D1063140D0; Thu, 30 Sep 2021 08:22:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id AolJMrZzVWEtLAAAMHmgww (envelope-from ); Thu, 30 Sep 2021 08:22:14 +0000 Message-ID: Date: Thu, 30 Sep 2021 10:22:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Subject: Re: [PATCH] mm: remove useless lines in enable_cpucache() Content-Language: en-US To: Shi Lei , cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210930034845.2539-1-shi_lei@massclouds.com> From: Vlastimil Babka In-Reply-To: <20210930034845.2539-1-shi_lei@massclouds.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 1C64B9000395 X-Stat-Signature: noy7n856b9tcojbh6amx8mt77kzgdm3o Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b="NmHM2p/H"; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=lyV0YFiF; dmarc=none; spf=pass (imf23.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-HE-Tag: 1632990135-433882 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: On 9/30/21 05:48, Shi Lei wrote: > These lines are useless, so remove them. I would clarify that they are useless after commit 10befea91b61 ("mm: memcg/slab: use a single set of kmem_caches for all allocations") > Signed-off-by: Shi Lei Reviewed-by: Vlastimil Babka > --- > 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) >