From patchwork Mon Nov 21 17:11:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlastimil Babka X-Patchwork-Id: 13051389 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 91DC7C43217 for ; Mon, 21 Nov 2022 17:12:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 61A586B0072; Mon, 21 Nov 2022 12:12:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A85A6B0075; Mon, 21 Nov 2022 12:12:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 41D086B007B; Mon, 21 Nov 2022 12:12:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 203A26B0072 for ; Mon, 21 Nov 2022 12:12:13 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id BCE8CAB26E for ; Mon, 21 Nov 2022 17:12:12 +0000 (UTC) X-FDA: 80158092504.30.B2F6100 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf12.hostedemail.com (Postfix) with ESMTP id 0F34640011 for ; Mon, 21 Nov 2022 17:12:11 +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-out1.suse.de (Postfix) with ESMTPS id 7BA8521ED7; Mon, 21 Nov 2022 17:12:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1669050730; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=DZnidYhlob4wYa4haMFdTT34ayZpbbmwklQkgFc8Awk=; b=igSelbSqFd3w5BzmX0A298SdSKeA17HOh2pkXAxBvORbNrOVcERZdte79/CIP7kyZ9OEQc qGTUwmDBZupXek/Pmhfp3udI5D94Oj0RJVsjFfgjZC+pWWslxUZg2BB5qo/PzH90NPa33a kz5FoQyCzMhgnlT8dzZH2qs2wVTkhV8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1669050730; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=DZnidYhlob4wYa4haMFdTT34ayZpbbmwklQkgFc8Awk=; b=9DPAJO6vdbpnXuxOCWq1ear04Z0+sgJIIyVq6GX4W7oxMG//ydLJqKKD/AnzraAic+kNFl ixgzkrl3OEeOHpBw== 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 12F081377F; Mon, 21 Nov 2022 17:12:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uQP0A2qxe2MQeQAAMHmgww (envelope-from ); Mon, 21 Nov 2022 17:12:10 +0000 From: Vlastimil Babka To: Christoph Lameter , David Rientjes , Joonsoo Kim , Pekka Enberg Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>, Roman Gushchin , Andrew Morton , Linus Torvalds , Matthew Wilcox , patches@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Vlastimil Babka , Aaro Koskinen , Arnd Bergmann , Christophe Leroy , Conor Dooley , Damien Le Moal , Geert Uytterhoeven , Janusz Krzysztofik , Jonas Bonn , Josh Triplett , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, openrisc@lists.librecores.org, Rich Felker , Russell King , Stafford Horne , Stefan Kristiansson , Tony Lindgren , Yoshinori Sato Subject: [PATCH 00/12] Introduce CONFIG_SLUB_TINY and deprecate SLOB Date: Mon, 21 Nov 2022 18:11:50 +0100 Message-Id: <20221121171202.22080-1-vbabka@suse.cz> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=igSelbSq; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=9DPAJO6v; spf=pass (imf12.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669050732; a=rsa-sha256; cv=none; b=Hlru0rw2rKWQA7UXhWvaOKoewVLEZOIGRGbVtV04wu3pRIlUauzyqosUMrD5a22/Q85Rnr prfQ8y2zQe/QWK/empFZzpZdkv4l1NkVVNZtpVZPDP/PDCfO1C3lbDsuGvB3Q7XSiNd5u1 z2gT1K/VZMLh4UL4m2PnTgCq6+Dua4w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669050732; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=DZnidYhlob4wYa4haMFdTT34ayZpbbmwklQkgFc8Awk=; b=eE9txOxaCD/3com3ubspb//g86fmo4dS1EPNXcHZGWiaY7J3ayjBkKB3NQPjVuQaL9cKmR mVxT1KgDK1AG2I6uexGfHZz+ZZIjNJ0ZnnaOgacfpdKdw7xcqAd6cm2aPr6AbhuWmPV2mz omz/HzRiMkuiDRHnrFKZNPw5pi4ZjC0= X-Rspamd-Queue-Id: 0F34640011 X-Rspam-User: Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=igSelbSq; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=9DPAJO6v; spf=pass (imf12.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-Rspamd-Server: rspam06 X-Stat-Signature: enqa8oqpd9ic5jkgtdbz7yrd3m983y5q X-HE-Tag: 1669050731-356999 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: Hi, this continues the discussion from [1]. Reasons to remove SLOB are outlined there and no-one has objected so far. The last patch of this series therefore deprecates CONFIG_SLOB and updates all the defconfigs using CONFIG_SLOB=y in the tree. There is a k210 board with 8MB RAM where switching to SLUB caused issues [2] and the lkp bot wasn't also happy about code bloat [3]. To address both, this series introduces CONFIG_SLUB_TINY to perform some rather low-hanging fruit modifications to SLUB to reduce its memory overhead. This seems to have been successful at least in the k210 case [4]. I consider this as an acceptable tradeoff for getting rid of SLOB. The series is also available in git: https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git/log/?h=slub-tiny-v1r2 [1] https://lore.kernel.org/all/b35c3f82-f67b-2103-7d82-7a7ba7521439@suse.cz/ [2] https://lore.kernel.org/all/a5bba3ca-da19-293c-c01b-a28291533466@opensource.wdc.com/ [3] https://lore.kernel.org/all/Y25E9cJbhDAKi1vd@99bb1221be19/ [4] https://lore.kernel.org/all/6a1883c4-4c3f-545a-90e8-2cd805bcf4ae@opensource.wdc.com/ Vlastimil Babka (12): mm, slab: ignore hardened usercopy parameters when disabled mm, slub: add CONFIG_SLUB_TINY mm, slub: disable SYSFS support with CONFIG_SLUB_TINY mm, slub: retain no free slabs on partial list with CONFIG_SLUB_TINY mm, slub: lower the default slub_max_order with CONFIG_SLUB_TINY mm, slub: don't create kmalloc-rcl caches with CONFIG_SLUB_TINY mm, slab: ignore SLAB_RECLAIM_ACCOUNT with CONFIG_SLUB_TINY mm, slub: refactor free debug processing mm, slub: split out allocations from pre/post hooks mm, slub: remove percpu slabs with CONFIG_SLUB_TINY mm, slub: don't aggressively inline with CONFIG_SLUB_TINY mm, slob: rename CONFIG_SLOB to CONFIG_SLOB_DEPRECATED arch/arm/configs/clps711x_defconfig | 3 +- arch/arm/configs/collie_defconfig | 3 +- arch/arm/configs/multi_v4t_defconfig | 3 +- arch/arm/configs/omap1_defconfig | 3 +- arch/arm/configs/pxa_defconfig | 3 +- arch/arm/configs/tct_hammer_defconfig | 3 +- arch/arm/configs/xcep_defconfig | 3 +- arch/openrisc/configs/or1ksim_defconfig | 3 +- arch/openrisc/configs/simple_smp_defconfig | 3 +- arch/riscv/configs/nommu_k210_defconfig | 3 +- .../riscv/configs/nommu_k210_sdcard_defconfig | 3 +- arch/riscv/configs/nommu_virt_defconfig | 3 +- arch/sh/configs/rsk7201_defconfig | 3 +- arch/sh/configs/rsk7203_defconfig | 3 +- arch/sh/configs/se7206_defconfig | 3 +- arch/sh/configs/shmin_defconfig | 3 +- arch/sh/configs/shx3_defconfig | 3 +- include/linux/slab.h | 8 + include/linux/slub_def.h | 6 +- kernel/configs/tiny.config | 5 +- mm/Kconfig | 38 +- mm/Kconfig.debug | 2 +- mm/slab_common.c | 16 +- mm/slub.c | 415 ++++++++++++------ 24 files changed, 377 insertions(+), 164 deletions(-) Acked-by: Mike Rapoport