From patchwork Mon Nov 20 18:34:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlastimil Babka X-Patchwork-Id: 13461873 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CA5DC197A0 for ; Mon, 20 Nov 2023 18:34:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C098D6B0396; Mon, 20 Nov 2023 13:34:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BBB8A6B0398; Mon, 20 Nov 2023 13:34:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A0B726B03A0; Mon, 20 Nov 2023 13:34:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 8A8726B0398 for ; Mon, 20 Nov 2023 13:34:44 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 51D35B50FD for ; Mon, 20 Nov 2023 18:34:44 +0000 (UTC) X-FDA: 81479183688.10.6E0AC87 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf27.hostedemail.com (Postfix) with ESMTP id 2164F40024 for ; Mon, 20 Nov 2023 18:34:41 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=iabcfhh4; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=SMcA0x+L; spf=pass (imf27.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700505282; h=from:from:sender:reply-to:subject:subject: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:dkim-signature; bh=Dcjx3iROX6mBTSjg5k3H+GZh2kSdjDYPdKkv3u7xaxo=; b=GIfk/cLc+jLluSxwWSGoRrjx0SW1EXvrc6EbE6pTAHIpvEjy17gsJB/vPxM8Dkxzum10I5 WjrsY7qkz+ibaobdjGLPsxH9U6BaNlmuFiQQXPR+z+SoGOhwxzT7QJ8f+8EiYCpkTaSBVj Km1GsBVJr26gAq28PY4I3KHcZmS1Q6U= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700505282; a=rsa-sha256; cv=none; b=31jlXw9/KfjPM7HRzDkk69OAkfmg6XrQyDFi0a+6XtJ7MY3Rc0Vt6ljepcGGmb0POGgOJg QUidiC76HU0R+ygEFP6i4u52kfdL/vPDzRWhRkVZVUVKDKRDkQq+diRwQrQMDRzOZ3YGdE mALUisV0ZO5HCuzQ0zikez3l00kiZaE= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=iabcfhh4; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=SMcA0x+L; spf=pass (imf27.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none 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 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 X-Rspamd-Queue-Id: 2164F40024 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 5q9e7yd4rs3jeuq1u1y9wwhiiwtwaxth X-HE-Tag: 1700505281-647557 X-HE-Meta: U2FsdGVkX19afW4ZX9Bs2OXm9K8YdqrpXNoH+5tD7nrZP2lFoDb8dRrQ6VNGBJFlfURIVl+Nki53vu4yETL6x0DdZVXC5IaWcHOXmwCRgZyobnIrngRQymNGqZBub8MpPqksKJxLP/xvlxLfBb6xXJHB6eiSND3uxkmi1enezn7eswC9e9NjVRd8w8unJmBGmxyvtVoL6hg4X+Y5eVj+SavkMhlrJkNUkch+/DOaF+GN5bXy18jA8AmOW1W2mpKa2+hC5ljZrLmPK0aKSCwjGu/2wRsD5Zg3dYYkf0AzEsY4k492iPlbMcK5qFmX2MXgXY/EOoi6gzYOxzJZcFKsxPJcz9m9Pe/EojZ3N1CmiiJHdrBUKIiQfdspmkJmDi0XvkWT25mMif0OX4+20we+Nyy5n8yKVD9K1XJfs366xPYWJPikwesioCUnGz3NRTeuae9nmndtTAoSEotO+kLZFFFPB4M3LDQurw1i4iVxKiKVjDGLJw/y447tLzq37PmNmgMqQwUvM73N1IbiA2ExdOe/FBdLGUz/VjQCArpdYrcKY46Ac7mkwDZH9gbDUceX78lvHtsjlRc4pCqQn3/YScuhuSROJb66lIAhuEbIEEujl20csiL14+bfvbjc/+mlWxHptQzyImUSYWwVokmGn9gRUa9+QWxQ1FpjsF0IPUwBYM2oqSNL5jKi6PeQJvktYE0nw7AfHme/MrZnI7Vraq+wbdR+h7zxqjGK9K16UoAuGZpiTVpJzCOqUUSIUhjjpWsbX2gvBeJ0eZyN8twXncwetP2mLHnoBFEaFWoz8hNZpHJys0PUMLSbqWQcvZdLkDZBNZ/eIVWmDzkXHTTNDmmKkRsksrDNlDwT5Rd+eT9F49okQcBxfRUR5lnJDV9FjrlALQKKctLhfOG7K+oGUg7dxYka2+xX8foKMXa2xjiLYWv60MG2ef9dqSOCRV/R1dubGNB312jHHWNfToq w1Roqaol zGKRKSE9b4qEnTcSPoZu1hLgsFBUbCcDZY8eyfirUZIV1Lf9TCqQZBgACy6U4sN6k0sQg8TLNKnOpip09Lxo+FB4mMExKuykVluZ0VCQtQO+p3t46JadiEmTwMz4nsDADqJEg7LrDsc9Hmz9btlr0ahwKcuwsvWcYk7Tn/LN7GaNOoMxVnbn2gLm5YRFYbU6bpoIjYYuJ30d1utagCMiQe0bAFi0M7QyJ8y81DzrP1BZ7vpSEd5p1ZWbhInJp6VDQMFE3ixOu5UGyGbY7qFP1oTp385BCF2feIVWzG7iJXr/o69ED7RQQo2AjEPOtOuLxEXaRPVPE0W904i0j7C9hCgYkhsT+dlA2fNnHM3TXHjV1n1efbPzKyDWJRfv/UtEGrsiBb7gCidXu9nICwArNWz+UIP1WRJWQebf1JYUrSRIkX/hCGW+fwwrr6Q== 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: List-Subscribe: List-Unsubscribe: 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 Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> --- 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,