Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6155252rwb; Tue, 22 Nov 2022 09:25:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf4cRNduoY4H3VEu6jvHKbb9kyhcjylV/ublAcxvtWN7mED23AdBQxwXLoEVBQVR8jjRCTnP X-Received: by 2002:a17:90a:8993:b0:215:d625:1076 with SMTP id v19-20020a17090a899300b00215d6251076mr22455426pjn.26.1669137923663; Tue, 22 Nov 2022 09:25:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669137923; cv=none; d=google.com; s=arc-20160816; b=SkmX9OMjwLq23CGFnS5Z4KmiPQn8e2++UaUYiwHOTDnyg6nklh8dfpnwqax8ARFAEO jqRsuu+QHkVFrWj2sYo/efMlhWaGMUeXVzfsM/03qo2hTywdTlOvjg9TXK7CPENu7ZMm 7k1dt5njuPynUSj+UH1XY4n4wpTTLqf1BsEilAvR3P6gDJRzptFAcqlSEjpk5/r5qt4F FhqOkXPfdvabie5MgaFsaPw708kDqCfvbfWDFLAljoXekKrPyigP7L0+R8gF/Ua24Tun ybJaWEbvInaT+I2d2CzSQnebxJhAzBqygG/3st3TrGcowa2ZNnHoF2PntlLrxNXvJFJJ vGUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=pc4NDY6xTkHaxDLkLDsVXDo3MteEDUFdw1xpmzDYbfM=; b=Cm8cjLthltEAH87yqyH+Qg0sowlbKZNuYWeNrDnxkLcYZLcq/OZ0RKkVUSbVDZx8a4 6Su21PjZTJ+fKMWLQWHoUkXAtPHmGgedCd37E7c2TB0HCHDWScmATbIA8BHkwLAhg4Ni /YovmFilK3UL9G7SxBwXHNJ3/Kzl3WaAP66yWibtScT3ZkJfMM7PD2z6iis1cozMxZOX qL3n4HOrN+fyOUaV2a7P+pfTarqFZyU+4LvHggD9FwAyfzbxmY83B9XIYFXhy36+Xzcf ZaVOiblV4ZwmViZYzgdLnxOTbSERagojKHEtAvqhe/fs7WeYScWNBo+nqcCZPZTAMSFq hwbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=ekjInMMw; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=bd6pg2ol; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a37-20020a631a65000000b0044d72a10aafsi15368511pgm.34.2022.11.22.09.25.12; Tue, 22 Nov 2022 09:25:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=ekjInMMw; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=bd6pg2ol; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233923AbiKVQeG (ORCPT + 90 others); Tue, 22 Nov 2022 11:34:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234259AbiKVQdr (ORCPT ); Tue, 22 Nov 2022 11:33:47 -0500 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23F0E70A19; Tue, 22 Nov 2022 08:33:42 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 7E2685C00E8; Tue, 22 Nov 2022 11:33:41 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute3.internal (MEProxy); Tue, 22 Nov 2022 11:33:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1669134821; x=1669221221; bh=pc4NDY6xTk HaxDLkLDsVXDo3MteEDUFdw1xpmzDYbfM=; b=ekjInMMw830aiISwkYkDlomkxv LwgcHF5IhLwOJsRoKEzeSJNscc3ql1pD4JCGrH2gqoPQs6shjkndoin4WNLpkCBb YnwL9iW5PMzdZxClFe0lxdB/WqGEXE+4loTAa/dby3XMsR04qkYM3oUMs3IJR+Fq lDqXV/3HXieuXAYGzLWCd66I7gNbTjehxb3IMxUfEMGM8daLgFMxVKoagyMHSilI eNHX5GEgYpWyaFV0GyAyOkFrV1ItLTJW3qqobxCB2A/JHi7mb5RLA4pFprhptC4U VIu9C5JJxRLv+YXdZOSaQpbc8V2XyC9nTC4UC3XGDl0Mf4Ts+SzS4uF/XhSg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1669134821; x=1669221221; bh=pc4NDY6xTkHaxDLkLDsVXDo3MteE DUFdw1xpmzDYbfM=; b=bd6pg2ol1IGfgetol9wblKdazAm8W6HmdfLKdOeFl3Bd BjPosdt5y8G4WMhjCe2sGd1RlptZdCefxQaOoWA1FP+xNL5aKsycMFwa2yTpTCqv 4PF50VRBFXgqVlp33HRW73ZgNTs55OEzowTUOuYvPmL14HZyQsHnW9skqQf7kvXn kapl4//CRWRhlSBm21Hd3xXcMHSJO1F1cVV475CeCT8cxuDKdeqxxxc0iljGAUml nOZUuEjIoDo7bmtn4KGDv64EY9xYYTWu/j7x1ZaVZdzI+5dfWBDLAwPYyjE5j29P NIyflEp+UIys0iXyvXjgCeGhTfmw0iZRR/IoAUgzUQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrheelgdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffjeetveeifeduffdugeehvdelffdtjedvgfejueffkeejkeetveettddvgfev heenucffohhmrghinhepohhpvghnfihrthdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 66842B60086; Tue, 22 Nov 2022 11:33:38 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead Mime-Version: 1.0 Message-Id: In-Reply-To: <20221121171202.22080-1-vbabka@suse.cz> References: <20221121171202.22080-1-vbabka@suse.cz> Date: Tue, 22 Nov 2022 17:33:17 +0100 From: "Arnd Bergmann" To: "Vlastimil Babka" , "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, "Aaro Koskinen" , "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 , 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: Re: [PATCH 00/12] Introduce CONFIG_SLUB_TINY and deprecate SLOB Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 21, 2022, at 18:11, Vlastimil Babka wrote: > > 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. I agree that this is a great success for replacing SLOB on the smallest machines that have 32MB or less and have to run a a highly customized kernel, and this is probably enough to have a drop-in replacement without making any currently working system worse. On the other hand, I have the feeling that we may want something a bit less aggressive than this for machines that are slightly less constrained, in particular when a single kernel needs to scale from 64MB to 512MB, which can happen e.g. on OpenWRT. I have seen a number of reports over the years that suggest that new kernels handle fragmentation and low memory worse than old ones, and it would be great to improve that again. I can imagine those machines wanting to use sysfs in general but not for the slab caches, so having a separate knob to configure out the sysfs stuff could be useful without having to go all the way to SLUB_TINY. For the options that trade off performance against lower fragmentation (MIN/MAX_PARTIAL, KMALLOC_RECLAIM, percpu slabs), I wonder if it's possible to have a boot time default based on the amount of RAM per CPU to have a better tuned system on most cases, rather than having to go to one extreme or the other at compile time. Arnd https://openwrt.org/toh/views/toh_standard_all?datasrt=target&dataflt%5B0%5D=availability_%3DAvailable%202021