Re: [PATCH v4] mm: add zblock allocator

Andrew Morton
2025-05-04T09:26:03Z

On Sat, 12 Apr 2025 17:42:07 +0200 Vitaly Wool <vitaly.wool@konsulko.se> 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@linux-foundation.org>
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@konsulko.se>
Cc: Igor Belousov <igor.b@beldev.am>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Yosry Ahmed <yosry.ahmed@linux.dev>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

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);
_