From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-188.mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E65B1ABEC5 for ; Tue, 28 Jan 2025 15:35:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738078526; cv=none; b=JPt/k8wZcRmxPlN6AqLdkHmTZGKoPel9FVTNHOc3Q2NPwXYRSc7CfCkEM2r3IAiinrVxLrAP/NSanTgzIXRb4hyAeckVLlZ/V/9hx8s0fiC7whpUv2fuN70HGBlOM5NA8rdQMYEC5v/FtwObPWfZSd7FryZIzZA4ufyS0Wg4sEM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738078526; c=relaxed/simple; bh=zKW//L45gMAw80qVTjbflNq4PFoKBz31Qrx43GwfFrY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MAxxu/IyshFdSEU/eHA2N3EWRLpz1cSMM4c8WIUt/1Za+E4EKLZLgycYFCtXPV7jBTMunDKq7QfVP8/ZwEJn4ummHp1IREXQVhV+h94u4u62X0WVIo0OyX8ocTuiMKN7bvw+0tIipYOkYzA8o1v6Tq0+/gEWlFKh9Qwg+M6IOtw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Xn3RLCWz; arc=none smtp.client-ip=91.218.175.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Xn3RLCWz" 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: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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.