Re: [PATCH v4] mm: add zblock allocator

Sergey Senozhatsky
2025-05-01T23:43:29Z

On (25/05/01 14:41), Vitaly Wool wrote:
[..]
> Bottom line, ending up with a lot of blocks each containing a single object
> is not a real life scenario.

Why not? What if the data patterns do not favor compressible objects?
E.g. what if the distribution of compressed objects looks like this (a real
zsmalloc stats):

size-class objs-allocated
---------------------------
...
1904 3315
1920 3468
1936 3515
2048 25816
2144 22363
2160 3230
2176 3075
2192 2990
2224 5665
2272 8118
2304 5040
2336 4529
2384 6132
2400 1768
2448 4825
2512 5135
2560 2944
2592 1562
2624 1512
2720 3813
2832 3315
2864 820
...

Notice tenth of thousands of 2048-2144 bytes objects. zsmalloc size
classes are fundamentally independent of each other and, hence, of
the compressed objects distribution: the lack of objects, or even
"the absence of" for that matter, in size-class 256 does not change
a thing for size-class 2048. This is a very important property.