Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp88916pxb; Thu, 30 Sep 2021 01:37:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyecrS0w4PDqRDGNul+DwK9Weo66E7q4TWYC3kKaAZfoPFoghL1q15bRCk//fjUsnCgLuTR X-Received: by 2002:a05:6402:21e1:: with SMTP id ce1mr5882872edb.17.1632991027730; Thu, 30 Sep 2021 01:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632991027; cv=none; d=google.com; s=arc-20160816; b=zQxYeLbSfOX/VRqv+5YMNyLAJ2TsegUyScTDlrkdQvTWxXYipIkLL1OTIg4yAvOog0 A461fI6t/OrTIjuciWLq/d0FxpBj6q/VkoQZmB+zrE7aoeMmuK2dTQEIy2TaeYstfq+f xG+qAAx71IFLEToqJFiOSu4OIdB9ffsajXdD+C9lT5uEBBR8uWZ6L4NEa4sazANDVyP6 HxKttfzV8rjxoPLCoP3lH5khRjaIjUEaRat9ppKsi6iDeUAji8FIdQGMRHusCI/3uiBa 0KM1QWB7Em5KoF63RQBgdGjhxORpC6B0i7SHHG8B8jVDJI0tTIXaN+E7V64ZxXOJJobg L8zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=x2lV+mK2M7/NdUSiHiSSKoGAAQWF1PWc4g6uu1e2Vpk=; b=Hf9Y2DA7/uuL6Vf9n7cFEFEaKanT30lU4JE58+ATGRiE5HnPR5dpIJaiqKZyT0cgAw Tyv4eyF0bFo9H4uZcxQG+DyLL4d1nVSi3CKrkvJUJBWYdeaCwz0hbgnHKI1HSc1GRHFg EnaO6ATSZ3wjS/w7ktHcVlIAXVVfVeflu1E8iWK5CZ5Fu54SPlmP+je3h0FW1Z9MU9wi jI7blKf1b0d4bVReBIEv5VLISnC+s2oZHDhT0yrK8dtQs545cIwflNWVNV/n6dgYF4p6 drLutkds8kv9jiPugPJu6h6O6bC3njn/LyrWL6YIoXMi6dG8gnkUq2Giyf8Ecrei93uF /1eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="NmHM2p/H"; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si2666795eja.677.2021.09.30.01.36.44; Thu, 30 Sep 2021 01:37:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="NmHM2p/H"; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349108AbhI3IX6 (ORCPT + 99 others); Thu, 30 Sep 2021 04:23:58 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:37732 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349083AbhI3IX6 (ORCPT ); Thu, 30 Sep 2021 04:23:58 -0400 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) >