Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2435092rdb; Mon, 20 Nov 2023 10:37:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEO11FuQpQo/VC27vL4sHaXAm3iB7W9bR2QsSJ52qlI60BsIKLuWEkYtFccDXbeaicWGhiw X-Received: by 2002:a05:6a20:e11e:b0:187:d18a:3163 with SMTP id kr30-20020a056a20e11e00b00187d18a3163mr8243272pzb.48.1700505426793; Mon, 20 Nov 2023 10:37:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700505426; cv=none; d=google.com; s=arc-20160816; b=ma90P45Pyb4wS8u2E5/MYxSiCAHxecth41KnC77v67bTQUM5oYWuGjZXUziLLW7m/F CIWo8iGzFZvlaRBzgyMpzWvNtO3qZbrNRM+4Ylshy2gv/W4JBpWyGq+F0NoG0DkciK/Q ZgQwoNqT/Ycr2roddfbrL66rSaa45or3HSyXNiShwzac5yCBrbx7gZ0V6sc1tgzkrsSV +GQudrRPBPfPgUXQ4Lliz4pbQ0oKLLVRnqUzkFMJ/SGo+4reBvWbP1OxpTDdp339QY11 Ge4mc6v8U9haVoO2p6C+cHsHzl9DvCBdoKOpN8y8xs6z6OnM0GldchhPQZbUS+rpEpNy CJ0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=Dcjx3iROX6mBTSjg5k3H+GZh2kSdjDYPdKkv3u7xaxo=; fh=dfD2X5Mb6QAP79KDvnu8aL/16Lml7JbeXAz+yHwdS1Q=; b=YZsDXpEtBc7UCr8CCIQ9/6K2ScHijTpqTwQcDxPKOerjGcCRoqxjQUT/cBqi/GQJA+ FJ2KGnuurz9ED7SYwn5GxffLMwDF+XPyKeVn38WXjdYO1TKW2U2OvyqUlKr4aIb+TDM0 sJqoPknLfKP4bD5ttSgebOBoSR5vrprexn/Wj0pRuxQkSdP/5ioJp/c7LRMAKukXG1HS jlNPhhtH5sm0uOV64bW2plwTh7KpvYSih+BueQi1IIJLrD8xXTOXzlRoKcGOXuJ5GM9F yKyNlgHDmrA/x4bC2Ve8Jnvp4o+WLFlqYD0uIhpmSxoY8QTsQlsrRxPBlVgxFV8yVv59 ECWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=iabcfhh4; dkim=neutral (no key) header.i=@suse.cz header.b=SMcA0x+L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id mu7-20020a17090b388700b0027ffcd44adasi9017544pjb.133.2023.11.20.10.36.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 10:37:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=iabcfhh4; dkim=neutral (no key) header.i=@suse.cz header.b=SMcA0x+L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 2EFE18058A13; Mon, 20 Nov 2023 10:36:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232515AbjKTSe5 (ORCPT + 99 others); Mon, 20 Nov 2023 13:34:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjKTSeq (ORCPT ); Mon, 20 Nov 2023 13:34:46 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45948CD; Mon, 20 Nov 2023 10:34:42 -0800 (PST) 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 B1C1A1F8A3; Mon, 20 Nov 2023 18:34:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1700505280; 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=Dcjx3iROX6mBTSjg5k3H+GZh2kSdjDYPdKkv3u7xaxo=; b=iabcfhh4odsQc6zDp2olm7PNY882amRs2jeidFM7m3QwHQ/lclc8hPOI8NZPfJ2P+ToeBE PXQMUqHf+8eqYd7nfwjwnm2wITFUjMhh/dVvGCHse6uE/410teLT/H1dAhXnZ+HTIgbR5n pjS68hEbUfPFiGClGTyR1lOMfg83uCM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1700505280; 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=Dcjx3iROX6mBTSjg5k3H+GZh2kSdjDYPdKkv3u7xaxo=; b=SMcA0x+Lw5Iwm1vNhrKZm+v49MtqmN+3hHoDk9+aQwO5+YsZIntAsbZVfn8zMp2CCbp4YN fz+vWcUOGgpTo+Dg== 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 77EF713499; Mon, 20 Nov 2023 18:34:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oCHMHMCmW2UUMgAAMHmgww (envelope-from ); Mon, 20 Nov 2023 18:34:40 +0000 From: Vlastimil Babka Date: Mon, 20 Nov 2023 19:34:16 +0100 Subject: [PATCH v2 05/21] mm/memcontrol: remove CONFIG_SLAB #ifdef guards MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231120-slab-remove-slab-v2-5-9c9c70177183@suse.cz> References: <20231120-slab-remove-slab-v2-0-9c9c70177183@suse.cz> In-Reply-To: <20231120-slab-remove-slab-v2-0-9c9c70177183@suse.cz> To: David Rientjes , Christoph Lameter , Pekka Enberg , Joonsoo Kim Cc: Andrew Morton , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Roman Gushchin , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Marco Elver , Johannes Weiner , Michal Hocko , Shakeel Butt , Muchun Song , Kees Cook , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org, linux-hardening@vger.kernel.org, Michal Hocko , Vlastimil Babka X-Mailer: b4 0.12.4 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -3.80 X-Spamd-Result: default: False [-3.80 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; MID_RHS_MATCH_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RL563rtnmcmc9sawm86hmgtctc)]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; BAYES_HAM(-0.00)[42.60%]; RCPT_COUNT_TWELVE(0.00)[25]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[linux-foundation.org,gmail.com,linux.dev,google.com,arm.com,cmpxchg.org,kernel.org,chromium.org,kvack.org,vger.kernel.org,googlegroups.com,suse.com,suse.cz]; RCVD_COUNT_TWO(0.00)[2]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 10:36:03 -0800 (PST) With SLAB removed, these are never true anymore so we can clean up. Reviewed-by: Kees Cook Acked-by: Michal Hocko Signed-off-by: Vlastimil Babka --- mm/memcontrol.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 774bd6e21e27..947fb50eba31 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5149,7 +5149,7 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of, return ret; } -#if defined(CONFIG_MEMCG_KMEM) && (defined(CONFIG_SLAB) || defined(CONFIG_SLUB_DEBUG)) +#if defined(CONFIG_MEMCG_KMEM) && defined(CONFIG_SLUB_DEBUG) static int mem_cgroup_slab_show(struct seq_file *m, void *p) { /* @@ -5258,8 +5258,7 @@ static struct cftype mem_cgroup_legacy_files[] = { .write = mem_cgroup_reset, .read_u64 = mem_cgroup_read_u64, }, -#if defined(CONFIG_MEMCG_KMEM) && \ - (defined(CONFIG_SLAB) || defined(CONFIG_SLUB_DEBUG)) +#if defined(CONFIG_MEMCG_KMEM) && defined(CONFIG_SLUB_DEBUG) { .name = "kmem.slabinfo", .seq_show = mem_cgroup_slab_show, -- 2.42.1