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 59280C0218A for ; Tue, 28 Jan 2025 15:35:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D91A8280239; Tue, 28 Jan 2025 10:35:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D41AC280238; Tue, 28 Jan 2025 10:35:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C0991280239; Tue, 28 Jan 2025 10:35:22 -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 9DE15280238 for ; Tue, 28 Jan 2025 10:35:22 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 407C18014B for ; Tue, 28 Jan 2025 15:35:22 +0000 (UTC) X-FDA: 83057259684.13.BA4B70E Received: from out-188.mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) by imf16.hostedemail.com (Postfix) with ESMTP id 1819B180014 for ; Tue, 28 Jan 2025 15:35:19 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Xn3RLCWz; spf=pass (imf16.hostedemail.com: domain of yosry.ahmed@linux.dev designates 91.218.175.188 as permitted sender) smtp.mailfrom=yosry.ahmed@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=1738078520; 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=Hfq/eIjzj8S6iojUm/63hxfMaERSCqjmB2zuGNBQkuU=; b=Gmu1hZwaFgEizQqJ/b8HjO3GKVcuJTifkcrySnrS02dOZijp6EcY83UQ2X8pEUmQUJznL3 vFDU/w4mg8gpRM4ReQThhiDNFGiyxR0071KG2JcgIwtgdb0QYJWkKyI5eMjjHUieJLdcWW 72Rm4aJRXYd0nR4wpgD+FOp2GVeWJa8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738078520; a=rsa-sha256; cv=none; b=Q7QDKTScx8/wXv5nq/r0Wcu7UMviS3Td/l5IXZa6BccXhSOro3UfAEAV4+xW8bhL0MwaMW 1+3oYcUpjOv2KIXNzoLLsbZ19QdwYuEtKkKXOSzYHZbOeLBHTQs5F4eNhrScXTsIjDMgKl D3OWPgbEg6IC12746Hs3WAye4/pqSqc= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Xn3RLCWz; spf=pass (imf16.hostedemail.com: domain of yosry.ahmed@linux.dev designates 91.218.175.188 as permitted sender) smtp.mailfrom=yosry.ahmed@linux.dev; dmarc=pass (policy=none) header.from=linux.dev Date: Tue, 28 Jan 2025 15:35:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1738078513; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Hfq/eIjzj8S6iojUm/63hxfMaERSCqjmB2zuGNBQkuU=; b=Xn3RLCWzyabKfmoX0T542QQJLVQ6Q1mCbeoaSvnoZZkrOFiXdKUb2TWATDCtN06Og5VEsK vjUe1k65e6TX9OC2mvrgGoKrShCP56BbT8zco5lUKX1QvJyZphpMypjmSGfliVJirPiooz KQS3YvvIV9/Q0N1JjwWMItQK7iXmLsw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yosry Ahmed To: Vitaly Wool Cc: Andrew Morton , Miaohe Lin , Johannes Weiner , Nhat Pham , Chengming Zhou , Huacai Chen , Seth Jennings , Dan Streetman , WANG Xuerui , linux-mm@kvack.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev Subject: Re: [PATCH 1/2] mm: zbud: deprecate CONFIG_ZBUD Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Stat-Signature: 45d6x67ahujbjuefpp8s1m8p67grei1h X-Rspamd-Queue-Id: 1819B180014 X-Rspam-User: X-Rspamd-Server: rspam06 X-HE-Tag: 1738078519-217754 X-HE-Meta: U2FsdGVkX1/JtUq0oWws92/2a/lDIFP9xiwM+FUvhM/wznuZZl4QrYjenI5LI9f0+ks2YbMpCHTY3rwirLxZmZ3jUEKAi9ADkcLd1wYaqLa/ZjsYRClnpF1tFefrY2LyRApUh4QyUaDxwSNCR5eq8nL8b1815JzfKPZlRBjn/Qs7XNmjkBnTYcB+mtm3SSo9W61QIOBj56VDtXcKiwIR2nhs/serWR/Qp2oCeTtJtaVdSMs7ubWGCt67IL50rlxycJh/g/k1AjjqfVmXok1srgL99BE+MiwX3vUjsDrdJk5uvCDCwR47fr7CNUGHES00XDbdPflxNwlUo4gUTDJ0ryonPdvNUTnu3eXCvEjht7i6k4PA2WmCbV0cvtQUi0TKcW5qw/vnHRRkNyuMLst4mzJuguFvXDyMMhcR6aBtN6Sv6JlVuYBAk2LbzWQWHP4VZJm7vTZLB3Rjzsur4scj/4u3sVDiejmTUF98yXGBIbXJXR+Zsksg8WBaBHKSarq8xupAYDRkYtb/Fuwh6168m3Eo0rp9jB7WyQ0EQneor2DANCrW8A2KSG3wfoLBroeCF0rBCiWrzIG3u1LnwEpGcpKC+K32i3/Z+fkR1LvYY8jgXmnPpPDVpI7XtAoSLT7XILSn+biLNHk86eYzZhsrInJOGwKJKnxmSXK0YEVEHYkVSgJx0VP9SSkPj7NaWUQdPbgLvRf1FeMhbMETjjO1eWwfPRDqvP08jIrmS81N0M6eRfxCGaQiTfzBuwV+/FKBNQHmhQQIuapRMVMZp+0+qydw0+uSYzxe2a2Jowmxng74ZWGD/75ZQgnCDVveR3bFLxEJ+lVh1+bGkyfPDDK0xi4ptrUDUQ/lgDL2RoFyTbAZERMW6B5181ZPq0V0nVw4usSKKqyLfXesM0QXZkEKOlybYHFA7CyK6RH332cOLuFHZ0bJBxachTqoof0/0N3zRaGJ2QbRi/ePdkE9wSH ZlcBms80 JLI/cQ+f6tQOdLIr52RYd2NVijgDvN1Dk0BaPgINyzt+tHDseiUsUG3RrMFoqEvr8YKpdja7m+QUJuMCekkjbrbwU3d5pDjIb+kYOl60/pr1Vt/Mumk3350iXdtThXgCdIgqdVXH5iyJUH10zt6FBJvX3cwQ3n9yLWZ0I33/0MNGAao40jiuwV8U8MkspGI5sH3ftJdBGcas1tb227+XCFFEbaEiUnTzP5JkAXw2HKbbKBftNUCgC+etSyHwQ7oNAcj74WjC9SZOz8teil21ygG8gpusatvBKI5ADc1q57jiZYtulaCYolybENA== 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 Tue, Jan 28, 2025 at 11:29:07AM +0100, Vitaly Wool wrote: > Hi Yosry, > > On Tue, Jan 28, 2025 at 12:58 AM 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. > > > > Following in the footsteps of [2], which deprecated z3fold, deprecated > > zbud as planned and remove it in a few cycles if no objections are > > raised from active users. > > > > Rename the user-visible config options so that users with CONFIG_ZBUD=y > > get a new prompt with explanation during make oldconfig. Also, remove > > CONFIG_ZBUD from defconfig. > > > > [1] > > https://lore.kernel.org/lkml/CAJD7tkbRF6od-2x_L8-A1QL3=2Ww13sCj4S3i4bNndqF+3+_Vg@mail.gmail.com/ > > [2] > > https://lore.kernel.org/lkml/20240904233343.933462-1-yosryahmed@google.com/ > > > > Signed-off-by: Yosry Ahmed > > > > Let me disagree here. The footprint for zbud and the ability to work in > MMU-less setups make it self sufficient and I don't support its deprecation. > I can give a formal NAK if that's required. What's the advtange of the ability to work on MMU-less setups when CONFIG_SWAP itself depends on MMU? Please elaborate. I agree that zbud has a smaller footprint, but I don't think that's enough reason to keep it around if it's not being used, especially that its memory utilization is really low.