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 B1E85C28B20 for ; Wed, 2 Apr 2025 16:25:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 51D5F280003; Wed, 2 Apr 2025 12:25:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4A5A0280001; Wed, 2 Apr 2025 12:25:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 31EB8280003; Wed, 2 Apr 2025 12:25:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 0F725280001 for ; Wed, 2 Apr 2025 12:25:00 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 2EB091201DA for ; Wed, 2 Apr 2025 16:25:01 +0000 (UTC) X-FDA: 83289628002.12.B22F4C8 Received: from out-181.mta0.migadu.com (out-181.mta0.migadu.com [91.218.175.181]) by imf20.hostedemail.com (Postfix) with ESMTP id 3E7251C000F for ; Wed, 2 Apr 2025 16:24:59 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=MTNuJXyH; spf=pass (imf20.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.181 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=1743611099; 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=0fujVAPFf0Gw5nDwqctPQHfXMhNiELoCFOv35wY9vs4=; b=FERjc5Xpuxz/smZOI2BbvEkkQs++T+ErVgrMoVIAnkTb8I7Ti8EMT8XvskXEjm21infv0P JJVehU+rar5O/NhrJGpC+nH5ES0hkPtUk4+caUs7GGuyelgTwE++mAweaoLE+ZWcKA0Kjm Jwp5kaMLg/u67mAmGPDlDAwQpuCF/pk= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=MTNuJXyH; spf=pass (imf20.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.181 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=1743611099; a=rsa-sha256; cv=none; b=RwWjVFZWar5LSIMfKfw6ccZDze1LaQP1jh1wOWGtlWag99Bpn9zjeoLCC+kYDPhpgPGP6U kB5TU6BlxQklwujUDJVezHknqcEJoLdCp8sYNpme0yKeiy8ExRJKLEsXsVuVmlK+LvxLIy L7YWCOCm0Idzd93/imNiIwhin5Rea4Y= Date: Wed, 2 Apr 2025 09:24:52 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1743611097; 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=0fujVAPFf0Gw5nDwqctPQHfXMhNiELoCFOv35wY9vs4=; b=MTNuJXyHL3m/UqsvgDmpRSg2aauLsiP3mHVPpepGz5yGjxPqbR28ezhQlBnLW/6vE9zuHN 2msNW3m+92+LocMtLmp4Aohpx+cBC/MGhqgwpdOiakCbSObVTRE2NlJnkd/pEVL9zV3i6o U2tsT6UUpstfGUVHj+SxSgIqY5M4RyM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: igor.b@beldev.am Cc: Vitaly Wool , linux-mm@kvack.org, akpm@linux-foundation.org Subject: Re: [PATCH] mm: add zblock allocator Message-ID: References: <20250401171754.2686501-1-vitaly.wool@konsulko.se> <6d5ed99eb91c5d13b8c16dde6f8df4d9@beldev.am> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6d5ed99eb91c5d13b8c16dde6f8df4d9@beldev.am> X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 3E7251C000F X-Rspamd-Server: rspam05 X-Rspam-User: X-Stat-Signature: jd6sbzs55wygen9okrhcnsej1zg47exi X-HE-Tag: 1743611099-751684 X-HE-Meta: U2FsdGVkX18wQC2CHyP6LTn9GkTizFccpnIxaufde9+Nvar2NQRvPhapWrQxbc9VkwogCLI9BammAGOJ1me0SWvE4m1FkFudzyWe2T6yhT0k/aUty8hZef2cMuYqoRTI1leInC2EeHjo3DJcWyp8Ldsl1TNGVbakYY25Xri8/WVHK/OqohMAectFLBRZR7a0khBNJhiowTbmqz2fP3iapngQBTW7KkS3tl8DUwOQExjGjIMZzY6eaQG3yuPMTdd0kMIZt+HQu2OCjz33PjQHDubfctZ84xLzQyvfiJd0goULk2JzKnOkYMwLMZRzoo9Td2F7eidBjyyLnhqG816HTPKmmI08sIau/3nrXCZwL/ZEXPPnCpm8sBkaj4+EocE9xAEyz3mGLZPk+LtMqVxV16tRDxbWNs30G07OwBQ4rVNqr7oajXglczBd1cMGUZAFYlSHHkHOD51YSVrdKChm9DTD3mOEQ1LJKrLXutIzePnLX4rfDpu6QSUSw4jQuMlNU43CISIoEkqt8o4jUF5wbdy9bdgoHzNifsr61TWAZNR9fcgfPawDd+ILhUGPgptDImfaDyaixP5uYJo2ZkM1zuB0bHArShu5FSsrBgkAXNRPNgXU6wLMmEtFLTrJcFp0S9asnVdEKT/EswhsYlM2sut6oDbwpLIMwEFBRiV8uXh2u2CeOUUjDp0ATpNGUSQv8+PRBiAT9qQl+YdPg3GOq7fzNeDCgbgw8PVNF/imdsYr27YiQvnCg3KQVR+ixRSYtmBUbFCQCGTEGmaLLCau1YDLwfcRnLG+820/czD+0v0vZZId2SQ9OgQgY9ocPCJ/2ElD5S7bQ4mzGmwSU9XCKE94shZvNUA8KvBkTxcSX0Tnz9Z4kg8YA67rEi+/GzjOtCAF5aBeQUfyNGwWFkp+ZUfTvcqnXBIffRDmPRT1C+0mM0/mXiYuDpaZMPzoLe2rqqkkPM+kRoXjcNXwtou NwQKPjE+ d57pgTixAp0VCp9BQ3dOD8cnZuppcSgdFiYqZRCEftH7JqFpIgO2hPTSvky2gpVxqaIOe281TamU7fRxFzA5a6Q3n5lgntlM8wPpWOVZGogwPl9SQCtLTSzu+PJiFxpVgTnVcJT7oF7M/12aXsMuTtCfw5coyGsyB1gcTnvHmrDRjr35UTyYUpuPlGA== 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: Hi Igor, On Wed, Apr 02, 2025 at 10:45:25AM +0400, igor.b@beldev.am wrote: > Hi Shakeel, > > 2025-04-02 03:16 Shakeel Butt wrote: > > Hi Vitaly, > > > > On Tue, Apr 01, 2025 at 07:17:54PM +0200, Vitaly Wool wrote: > > > zblock is a special purpose allocator for storing compressed pages. > > > It stores integer number of compressed objects per its block. These > > > blocks consist of several physical pages (2**n, i. e. 1/2/4/8). > > > > > > With zblock, it is possible to densely arrange objects of various > > > sizes > > > resulting in low internal fragmentation. Also this allocator tries to > > > fill incomplete blocks instead of adding new ones, in many cases > > > providing a compression ratio substantially higher than z3fold and > > > zbud > > > (though lower than zmalloc's). > > > > > > zblock does not require MMU > > > > Can you explain why not requiring MMU is important for your use-case? > > Also what exactly is your use-case? Are you planning to use zblock > > through zram or zswap or something new? > > We have 2 use cases for a zpool backend: data centers (zswap) and small MMU > less devices, this is where zram comes ito play. We know that zram over > zpool patch is still out of tree but we also know the story behind that :) > So zswap and zram are the use-cases. It is usually frowned upon to add a general purpose library without an actual user. So, I would recommend to add a user along with the zblock. > > > to operate and also is superior to zsmalloc > > > with regard to average performance and worst execution times, thus > > > allowing for better response time and real-time characteristics of the > > > whole system. > > > > > > E. g. on a series of stress-ng tests run on a Raspberry Pi 5, we get > > > 5-10% higher value for bogo ops/s in zblock/zsmalloc comparison. > > > > Can you explain a bit more on this test? How is this test using zblock? > > We're running stress-ng on a number of devices. The results published in the > previous message are from the run on Raspberry Pi 5. zpool's settings used > for comparison are lz4/80%. > My question was mainly if this is zswap or zram and I think it is zswap based on the stress-ng command. For zswap, I would recommend to run perf experiment on a server (or beefy desktop) as well. Also pick a normal server like workload. I would be interested in looking at zswapin latencies and zswapout throuput in addition to the metrics the workload cares about. > Thanks, > Igor >