Hello, Yu Zhao, Dan, sorry for the delay On (01/10/18 15:06), Dan Streetman wrote: [..] > Well, I think shrink vs evict an implementation detail, isn't it? > That is, from zswap's perspective, there should be: > > zpool_evictable() > if true, zswap needs to include the header on each compressed page, > because the zpool may callback zpool->ops->evict() which calls > zswap_writeback_entry() which expects the entry to start with a zswap > header. > if false, zswap doesn't need to include the header, because the zpool > will never, ever call zpool->ops->evict > > zpool_shrink() > this will try to shrink the zpool, using whatever > zpool-implementation-specific shrinking method. If zpool_evictable() > is true for this zpool, then zpool_shrink() *might* callback to > zpool->ops->evict(), although it doesn't have to if it can shrink > without evictions. If zpool_evictable() is false, then zpool_shrink() > will never callback to zpool->ops->evict(). ACK on this! -ss -- 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>