Messages in this thread | | | Date | Thu, 11 Jan 2018 15:57:57 +0900 | From | Sergey Senozhatsky <> | Subject | Re: [PATCH] zswap: only save zswap header if zpool is shrinkable |
| |
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
| |