From mboxrd@z Thu Jan 1 00:00:00 1970 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 3D23BC0218D for ; Wed, 29 Jan 2025 19:26:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A9B7A28008F; Wed, 29 Jan 2025 14:26:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A4A7228008D; Wed, 29 Jan 2025 14:26:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 912E828008F; Wed, 29 Jan 2025 14:26:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 7419D28008D for ; Wed, 29 Jan 2025 14:26:27 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id CF8404484A for ; Wed, 29 Jan 2025 19:26:26 +0000 (UTC) X-FDA: 83061470772.01.8D684B0 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) by imf17.hostedemail.com (Postfix) with ESMTP id 5DB4340015 for ; Wed, 29 Jan 2025 19:26:23 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Ue848SLQ; spf=pass (imf17.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.182 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738178783; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ESHb3thQtuXbodFmYjILE5mf+awO3LfeN6uNWFEO8zw=; b=Ol4A8sQBe6H+6qW0AOJ+6FGXQh71CtMvs1RMVhLqh5a9E839HFT8t/Z/olZRlbfmeWukWj NsnwRxYQC2EW+W3RDBbeUILgeaj6OLsAugFmRhNuPV8h3ginmEIsf7sNGqKCgUHaKpktJX hH0JRM7fsQ2zkn0DP68sdD56AfM4MXc= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Ue848SLQ; spf=pass (imf17.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.182 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738178783; a=rsa-sha256; cv=none; b=sKm40I6MJTSlftZ6V9JAkPzW23nqUbqkoilP8ydnxUI25dCw18Tc082Xa+Ab2V1pOEhzZ9 A1H6ZS03/Pa24kDnUeqFrF0cqgTXsaYJoCftqyMVI3rrmNlfq2XEojdS5rpelwXLsEKial hWAs0OT9f6qQHgDW3X4VJRuQR1hPVVg= Date: Wed, 29 Jan 2025 11:26:11 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1738178776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ESHb3thQtuXbodFmYjILE5mf+awO3LfeN6uNWFEO8zw=; b=Ue848SLQp7AXW2KAD9bD74z2dJ6Q8MWVgLoMSyHTXvSi90lOcXAd5dCubuCawhV6imZ/yE TFustaZgK70Izn6A/U2+3/f0Jn17TBGv1l/xghddJRBf9HsudRqFudSr1AF8PRJn+xSLPt Ur5jHoAISh1WHbzp6dTb+w5Sw7SziCQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Yosry Ahmed Cc: Andrew Morton , Vitaly Wool , Seth Jennings , Dan Streetman , Miaohe Lin , Johannes Weiner , Nhat Pham , Chengming Zhou , Huacai Chen , WANG Xuerui , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, linux-s390@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v2 2/2] mm: zbud: remove zbud Message-ID: <63bf6cenq2sg55jorlvwtstyt6xrsi3yayidh3uvdtyib3flbh@ni2ezwfvpggl> References: <20250129180633.3501650-1-yosry.ahmed@linux.dev> <20250129180633.3501650-3-yosry.ahmed@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250129180633.3501650-3-yosry.ahmed@linux.dev> X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 5DB4340015 X-Stat-Signature: nf374e7gaqdsagdzue6xpkioeut5bn1a X-Rspamd-Server: rspam08 X-Rspam-User: X-HE-Tag: 1738178783-871491 X-HE-Meta: U2FsdGVkX1/9M6z+4loy9z0TqGDyeRVq02yGjZmHaQVzva7gOd0P70VS++ULVNEfsV4f+waa8R809P1JU0rj59/Q0wp4zkMEliTND5enejmZc/K+WOfgzodhlk9uxTFEDiFRLm4BbnfOo/KTGo4FjleRbpKBHX3vjkjgtm/G6b215oO+n4bGqGyu9gj/mhQnuMCg711uxRzZs8y2fyB5nmJS2r0WqgLf+AkNmGKc+n2znxZ2MH5NVj353xR96VkySFCOqpey2NFrblllff+e3itpp2GCqwzeZa6i3it6lXyVEy4uA2CNgUb3Vd+rfq0rG5+njH1RqQmXgvkQke/lVjr9yiVmxPeoY4MFyTf2uz6zcLqG+iaHHYyAZjOtLjm2ROY2tDArUaD1Af8tJZ8v4pRz6GezY7olpjyh+S2kcE7uVoyPAgDn07ftdzokwEp5AEK0eOV8x5FJOdMbcP0yAQk9ZP+lsb2zYkw14jujI9vRCIxLUdbOnfuKdvkqDtycNqxlmxAaLDwnY0GzLY0///VG5u8U1maDdl6h+bgsmI9G9oTVDrxkTxAWLhqZ691t8wMg7hAYUm5kky9UqBfnLZ35fVJSCO8wV+U8obiS9a4kAmCXoKZaczpnbb8sFAqRAtRhW921PUHo0+PZYswikMHukmbs/U++h87sKYWbVZ7mXCUup2sr9C23gYXmWPS+FyPJ5qn23JAJw8FhW7ubkC1C8ZrgXURD7LubBhSemQwYGrmFcme6M/ZKDfr/OvXyyU1PBOdegm3ZD+t5VuUUuYpGGXuf+1eEoOeo0RCO5jbvJd7j7uGrAwErpd8P0hIyo0H39MHXmsgOl68h9FZpj25gtuXg7YPQmnzs7xlf9WcwNuLPbbN7H6wi0GBDFd+Rju8fj1gZzGk+Gb4IPeaUn4Vj9pbDuzuKhgWs/XfFpOCgf9BrTUdTCY2L6f3fT3w6LTxkzDfusLMRSGc6+co rIfwXi6V c1UvBNXFkflOywsEhZeNYcozIkKH4BOr800wAbuDVliyJY5bHAcfZ4GMeh3Je8MjWSNpeVAX9TNJAdXSmXCxyS4VEPotyYzZh+0Is0Gnduz0wkf04LhBWUEuWi0+zpzr3JvmL+sMbAci0SKK1To96/R5x+a6OJrJtTlvKiqDvqngK2ZmXGi9clkS/9A2DAm2Ab8NohcJQipOakj6ZXp4mlG1o/hwN+JfQK5RMaFIu0S4YzJDyEptFOWHxe9fBmnuZ+EHN 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: On Wed, Jan 29, 2025 at 06:06:32PM +0000, Yosry Ahmed wrote: > The zbud compressed pages allocator is rarely used, most users use > zsmalloc. zbud consumes much more memory (only stores 1 or 2 compressed > pages per physical page). The only advantage of zbud is a marginal > performance improvement that by no means justify the memory overhead. > > Historically, zsmalloc had significantly worse latency than zbud and > z3fold but offered better memory savings. This is no longer the case as > shown by a simple recent analysis [1]. In a kernel build test on tmpfs > in a limited cgroup, zbud 2-3% less time than zsmalloc, but at the cost > of using ~32% more memory (1.5G vs 1.13G). The tradeoff does not make > sense for zbud in any practical scenario. > > The only alleged advantage of zbud is not having the dependency on > CONFIG_MMU, but CONFIG_SWAP already depends on CONFIG_MMU anyway, and > zbud is only used by zswap. > > Remove zbud after z3fold's removal, leaving zsmalloc as the one and only > zpool allocator. Leave the removal of the zpool API (and its associated > config options) to a followup cleanup after no more allocators show up. > > Deprecating zbud for a few cycles before removing it was initially > proposed [2], like z3fold was marked as deprecated for 2 cycles [3]. > However, Johannes rightfully pointed out that the 2 cycles is too short > for most downstream consumers, and z3fold was deprecated first only as a > courtesy anyway. > > [1]https://lore.kernel.org/lkml/CAJD7tkbRF6od-2x_L8-A1QL3=2Ww13sCj4S3i4bNndqF+3+_Vg@mail.gmail.com/ > [2]https://lore.kernel.org/lkml/Z5gdnSX5Lv-nfjQL@google.com/ > [3]https://lore.kernel.org/lkml/20240904233343.933462-1-yosryahmed@google.com/ > > Signed-off-by: Yosry Ahmed Reviewed-by: Shakeel Butt