Re: [PATCH v6 3/5] zsmalloc: move it under zram

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 14, 2013 at 02:55:34PM +0900, Minchan Kim wrote:
> This patch moves zsmalloc under zram directory because there
> isn't any other user any more.
> 
> Before that, description will explain why we have needed custom
> allocator.
> 
> Zsmalloc is a new slab-based memory allocator for storing
> compressed pages.  It is designed for low fragmentation and
> high allocation success rate on large object, but <= PAGE_SIZE
> allocations.

One things zsmalloc will probably have to address before Andrew deems it
worthy is the "memmap peekers" issue.  I had to make this change in zbud
before Andrew would accept it and this is one of the reasons I have yet
to implement zsmalloc support for zswap yet.

Basically, zsmalloc makes the assumption that once the kernel page
allocator gives it a page for the pool, zsmalloc can stuff whatever
metatdata it wants into the struct page.  The problem comes when some
parts of the kernel do not obtain the struct page pointer via the
allocator but via walking the memmap.  Those routines will make certain
assumption about the state and structure of the data in the struct page,
leading to issues.

My solution for zbud was to move the metadata into the pool pages
themselves, using the first block of each page for metadata regarding that
page.

Andrew might also have something to say about the placement of
zsmalloc.c.  IIRC, if it was going to be merged, he wanted it in mm/ if
it was going to be messing around in the struct page.

Seth

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]