Re: [PATCH v4] mm: add zblock allocator

From: Andrew Morton
Date: Sun May 04 2025 - 05:26:11 EST


On Sat, 12 Apr 2025 17:42:07 +0200 Vitaly Wool <vitaly.wool@xxxxxxxxxxx> wrote:

> zblock is a special purpose allocator for storing compressed pages.
> It stores integer number of same size 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 comparable to zmalloc's.
>
> zblock is also in most cases 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.
>
> High memory and page migration are currently not supported by zblock.
>

My x86_64 allmodconfig build failed.

MODPOST Module.symvers
ERROR: modpost: "try_alloc_pages_noprof" [mm/zblock.ko] undefined!

I don't understand why this wasn't encountered earlier.


From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Subject: mm-add-zblock-allocator-fix-2
Date: Sun May 4 02:13:54 AM PDT 2025

export try_alloc_pages_noprof() to modules for CONFIG_ZBLOCK=m

Cc: Vitaly Wool <vitaly.wool@xxxxxxxxxxx>
Cc: Igor Belousov <igor.b@xxxxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Nhat Pham <nphamcs@xxxxxxxxx>
Cc: Shakeel Butt <shakeel.butt@xxxxxxxxx>
Cc: Yosry Ahmed <yosry.ahmed@xxxxxxxxx>
Cc: David Hildenbrand <david@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

mm/page_alloc.c | 1 +
1 file changed, 1 insertion(+)

--- a/mm/page_alloc.c~a
+++ a/mm/page_alloc.c
@@ -7470,3 +7470,4 @@ struct page *try_alloc_pages_noprof(int
kmsan_alloc_page(page, order, alloc_gfp);
return page;
}
+EXPORT_SYMBOL_GPL(try_alloc_pages_noprof);
_