linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shakeel Butt <shakeel.butt@linux.dev>
To: igor.b@beldev.am
Cc: Vitaly Wool <vitaly.wool@konsulko.se>,
	linux-mm@kvack.org,  akpm@linux-foundation.org
Subject: Re: [PATCH] mm: add zblock allocator
Date: Wed, 2 Apr 2025 09:24:52 -0700	[thread overview]
Message-ID: <jyxrqqappmlixb4j5hbybe33xbaiuqibjbxzxvkco4eshp2xu3@wl4fxm32pkwv> (raw)
In-Reply-To: <6d5ed99eb91c5d13b8c16dde6f8df4d9@beldev.am>

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
> 


  reply	other threads:[~2025-04-02 16:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 17:17 Vitaly Wool
2025-04-01 18:24 ` Nhat Pham
2025-04-01 21:44   ` Vitaly
2025-04-01 23:16 ` Shakeel Butt
2025-04-02  6:45   ` igor.b
2025-04-02 16:24     ` Shakeel Butt [this message]
2025-04-03 21:54     ` Nhat Pham
2025-04-02 13:03 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jyxrqqappmlixb4j5hbybe33xbaiuqibjbxzxvkco4eshp2xu3@wl4fxm32pkwv \
    --to=shakeel.butt@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=igor.b@beldev.am \
    --cc=linux-mm@kvack.org \
    --cc=vitaly.wool@konsulko.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox