Re: [PATCH v2] zswap: only save zswap header when necessary

2018-01-10 Thread Yu Zhao
On Wed, Jan 10, 2018 at 02:47:41PM -0800, Yu Zhao wrote: > We waste sizeof(swp_entry_t) for zswap header when using zsmalloc > as zpool driver because zsmalloc doesn't support eviction. > > Add zpool_evictable() to detect if zpool is potentially evictable, > and use it in zswap to avoid waste memo

[PATCH v2] zswap: only save zswap header when necessary

2018-01-10 Thread Yu Zhao
We waste sizeof(swp_entry_t) for zswap header when using zsmalloc as zpool driver because zsmalloc doesn't support eviction. Add zpool_evictable() to detect if zpool is potentially evictable, and use it in zswap to avoid waste memory for zswap header. Signed-off-by: Yu Zhao --- include/linux/zp