Re: [PATCH 0/5] staging: zsmalloc: memory allocator for compressedpages

From: Andrew Morton
Date: Fri Jan 20 2012 - 17:03:44 EST


On Mon, 9 Jan 2012 16:51:55 -0600
Seth Jennings <sjenning@xxxxxxxxxxxxxxxxxx> wrote:

> This patchset introduces a new memory allocation library named
> zsmalloc. zsmalloc was designed to fulfill the needs
> of users where:
> 1) Memory is constrained, preventing contiguous page allocations
> larger than order 0 and
> 2) Allocations are all/commonly greater than half a page.
>
> In a generic allocator, an allocation set like this would
> cause high fragmentation. The allocations can't span non-
> contiguous page boundaries; therefore, the part of the page
> unused by each allocation is wasted.
>
> zsmalloc is a slab-based allocator that uses a non-standard
> malloc interface, requiring the user to map the allocation
> before accessing it. This allows allocations to span two
> non-contiguous pages using virtual memory mapping, greatly
> reducing fragmentation in the memory pool.

The changelog doesn't really describe why the code was written and
provides no reason for anyone to merge it.

Perhaps the reason was to clean up and generalise the zram xvmalloc
code. Perhaps the reason was also to then use zsmalloc somewhere else
in the kernel. But I really don't know. This is the most important
part of the patch description and you completely omitted it!


Where will this code live after it escapes from drivers/staging/? mm/?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/