On (23/04/16 20:55), Yu Zhao wrote: > > Do you run some specific test? > > E.g., > tools/testing/selftests/kvm/max_guest_memory_test -c 112 -m 800 -s 800 > with 112 CPUs and ~770GB DRAM + 32GB zram. Hmm ... Something like this maybe? The src zspage pointer is not NULL-ed after non-empty zspage is put back to corresponding fullness list. --- @@ -2239,8 +2241,8 @@ static unsigned long __zs_compact(struct zs_pool *pool, if (fg == ZS_INUSE_RATIO_0) { free_zspage(pool, class, src_zspage); pages_freed += class->pages_per_zspage; - src_zspage = NULL; } + src_zspage = NULL; if (get_fullness_group(class, dst_zspage) == ZS_INUSE_RATIO_100 || spin_is_contended(&pool->lock)) {