From patchwork Mon Nov 20 18:34:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlastimil Babka X-Patchwork-Id: 13461881 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 A213FC197A0 for ; Mon, 20 Nov 2023 18:35:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3A15D6B03AA; Mon, 20 Nov 2023 13:34:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E7516B03AE; Mon, 20 Nov 2023 13:34:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D71EC6B03C4; Mon, 20 Nov 2023 13:34:45 -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 8B9396B03AE for ; Mon, 20 Nov 2023 13:34:45 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 5E192140684 for ; Mon, 20 Nov 2023 18:34:45 +0000 (UTC) X-FDA: 81479183730.01.DB682C5 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf11.hostedemail.com (Postfix) with ESMTP id 6B0C94000B for ; Mon, 20 Nov 2023 18:34:42 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=lskh8+Nj; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=JQZpJQ9Q; dmarc=none; spf=pass (imf11.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz 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=Nuh5DWhwaSyo20acRrWx07FPXsn5IPuIhuzYTBlJYws=; b=PpwcE2+Og2m041ztZiJ/gASD8eYUJDY3pLb9kPyK0X1ujkjWyjIZakRkVWrFBinysOaEGo B6JMe69h/B78Y7rWpvSWAaKVBhAXq28EAaMW3W9Cc8R8IgLHGSXaXuuDgf4viPg3BDVp3l to1W+bhOBklmUvHq7RMPZjknhtJGfD0= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=lskh8+Nj; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=JQZpJQ9Q; dmarc=none; spf=pass (imf11.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700505282; a=rsa-sha256; cv=none; b=yOQwBGTRpTKLM8O/zdOSuCJ7HtLETlcnmkKS0D9XUnKGR5zyLxhvH4kPP07mdOhLDfATrf x1boHQZ0apJZfe41iz5c59JjkRQB8efuo089js34oXSKky5pyI4//kC03IzBU9LAaTScbZ nx2GjcKYSlgx46vMAzo44rM7LwPnqmY= 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 E9DB51F8A6; 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=1700505281; 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=Nuh5DWhwaSyo20acRrWx07FPXsn5IPuIhuzYTBlJYws=; b=lskh8+NjK84cZG7SqKSCZ3eO/1MD4vKkfHBAshUThScOC2oN+kMYJ8x9sYozYLNmkzrd3A LxQPABh9kQLuS0d+9TV0Q2NyivMyMU8lu39fMN/UrdjCZBe7zgHDJuSxiIyEYpyEqEHic4 Bw8gBimBBkAowKVXEpP+Gc+OyuPIHg4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1700505281; 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=Nuh5DWhwaSyo20acRrWx07FPXsn5IPuIhuzYTBlJYws=; b=JQZpJQ9QP2ykM79Wrgq2dvV7Adexjb5rfIKIGaG+WP3EYoAutlKPhZK2HTY7mb4eToR1YJ af8qGS6UtGLnEjDQ== 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 B55FE13912; 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 UAbTK8CmW2UUMgAAMHmgww (envelope-from ); Mon, 20 Nov 2023 18:34:40 +0000 From: Vlastimil Babka Date: Mon, 20 Nov 2023 19:34:17 +0100 Subject: [PATCH v2 06/21] cpu/hotplug: remove CPUHP_SLAB_PREPARE hooks MIME-Version: 1.0 Message-Id: <20231120-slab-remove-slab-v2-6-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, Vlastimil Babka X-Mailer: b4 0.12.4 X-Rspamd-Queue-Id: 6B0C94000B X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 6aarzyj9muyb6he5x4kbrs5gsa3u7k3e X-HE-Tag: 1700505282-784901 X-HE-Meta: U2FsdGVkX1+KIKCX6+TXGFNEsgfSDz/ONN6pXluYWtr3ZmVMGsaxrB9vNz87nSZFFP5TI8PRLklPUAqt+WMv+Sv0xr6fW+oz6dAW5Y9tY7x8LGPvaNTBBqqK415lrgNVVVX0kUFZpr7odaGN5C77ts12PGcuH7vYTlLZbIjBc1s3psSpiZsBbRHlDJdKjvOV4HpbSF1ZFgp6fUFxWqvvSCSmcYu2lltopzmObtEc9IuzTREG+oyDWnYi0Ie4T99FUHeQN4O+I+fOrFt2pQ7nbM6LfXN4f+H6IS82tIahs2COuzpDkZNL3chGArWxI8ZgllHlmN9bEkFEgzcJGIyNxSCBR+RHrVjs7nLvt2rp6FGCXq92NbvClIvPYhW5hddIzcF5lkLNLYk8msWDLU1rqSbU+ZCewjGoGSRujGCFK/SfhzcyvWoMV1HGpumT5evEwtT50r2f6CwzoBu21diCRtrFuX2iJBjDmSgulxt1k6xJmyj9vtamcmmJKaAwBa7k+tFPRgUV6ehQd8hF9J5mY+0sI2ehW0/m7XbTUkX4x4A9nh/31deLCpsmQoV28m64C5bBOSLSR1mg29mx5vmO821sRGBf5ohVschiHUmWtzli3CuZB4htLQPJVapA0ls2kzztvulnVtjtD6fSpaN6sMm9MQYcLT6Bk5JueOxo/FxHqjhGYHUCZf8pzA6JjJ8WfGZRHNPMnHMyjkZKXeO+E81ly9AVMT5lysYdxegAOgcrijiReuMqjoxL4SWVgy1jf16sk5KcZuR7RYseGBYcUCwk8pj3H6sJjXi4Hbwv67VqGmn4nx19jDgtcSxlEAJ5z8iVUVU07qfd43RA6hVkJ/1sUy0d6XbvX3+cGwuq8LXZES1k6jLyJCStQlZY0bQHXs8xdN73mhLGTRxV6e/GPArS6by2NkPUqJm5zWTDKgDaWsC+1a3HOBKzlgAVTTBfyQGqdGOPH7BNxQHnjHx lHIqjzye P4t5BFccISrbQx0zLZzdqvzNU9yBekLVz/sauKwUN65F1H5A8EZdAs42JPXkWubrkek3PiwmsVutANUZfIISHPptJIwrQOb5Y/ddQTlmNvgQQuUSpnZuGVlg//1HdeMPYTWNMP83Oqoho4ncowzew7SEHu1jFAZ+OSkn7jVHbZXfjWKdaOYRi9fcqB6Jeta71cY1zm9hQw6Nyr9vhfb9A9yNyn7IKFCcfCnaBapVZDM9Qs/7PanimziHpAt5dnSK6wsbL7WkYxIk+9nqTlqrPvQQAVy3uhlRn7sUp/6D/maHF/0kyPtqDRWaBlHC/pyxI50BH 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: The CPUHP_SLAB_PREPARE hooks are only used by SLAB which is removed. SLUB defines them as NULL, so we can remove those altogether. Signed-off-by: Vlastimil Babka Acked-by: Thomas Gleixner Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> --- include/linux/cpuhotplug.h | 1 - include/linux/slab.h | 8 -------- kernel/cpu.c | 5 ----- 3 files changed, 14 deletions(-) diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index d305db70674b..07cb8f7030b6 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h @@ -108,7 +108,6 @@ enum cpuhp_state { CPUHP_X2APIC_PREPARE, CPUHP_SMPCFD_PREPARE, CPUHP_RELAY_PREPARE, - CPUHP_SLAB_PREPARE, CPUHP_MD_RAID5_PREPARE, CPUHP_RCUTREE_PREP, CPUHP_CPUIDLE_COUPLED_PREPARE, diff --git a/include/linux/slab.h b/include/linux/slab.h index d6d6ffeeb9a2..34e43cddc520 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -788,12 +788,4 @@ size_t kmalloc_size_roundup(size_t size); void __init kmem_cache_init_late(void); -#if defined(CONFIG_SMP) && defined(CONFIG_SLAB) -int slab_prepare_cpu(unsigned int cpu); -int slab_dead_cpu(unsigned int cpu); -#else -#define slab_prepare_cpu NULL -#define slab_dead_cpu NULL -#endif - #endif /* _LINUX_SLAB_H */ diff --git a/kernel/cpu.c b/kernel/cpu.c index 9e4c6780adde..530b026d95a1 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -2125,11 +2125,6 @@ static struct cpuhp_step cpuhp_hp_states[] = { .startup.single = relay_prepare_cpu, .teardown.single = NULL, }, - [CPUHP_SLAB_PREPARE] = { - .name = "slab:prepare", - .startup.single = slab_prepare_cpu, - .teardown.single = slab_dead_cpu, - }, [CPUHP_RCUTREE_PREP] = { .name = "RCU/tree:prepare", .startup.single = rcutree_prepare_cpu,