[PATCH v1 10/10] zsmalloc: record handle in page->private for huge object

2015-01-20 Thread Minchan Kim
We stores handle on header of each allocated object so it increases the size of each object by sizeof(unsigned long). If zram stores 4096 bytes to zsmalloc(ie, bad compression), zsmalloc needs 4104B-class to store the data with handle. However, 4104B-class has 1-pages_per_zspage so wasted size

[PATCH v1 10/10] zsmalloc: record handle in page-private for huge object

2015-01-20 Thread Minchan Kim
We stores handle on header of each allocated object so it increases the size of each object by sizeof(unsigned long). If zram stores 4096 bytes to zsmalloc(ie, bad compression), zsmalloc needs 4104B-class to store the data with handle. However, 4104B-class has 1-pages_per_zspage so wasted size