Re: [PATCH 4/5] zsmalloc: Add ops fields to zs_pool to store evict handlers

From: Sergey Senozhatsky
Date: Wed Nov 02 2022 - 00:10:12 EST


On (22/10/26 13:06), Nhat Pham wrote:
> +struct zs_pool;
> +
> +struct zs_ops {
> + int (*evict)(struct zs_pool *pool, unsigned long handle);
> +};
> +
> struct zs_pool {
> const char *name;
>
> @@ -242,6 +248,12 @@ struct zs_pool {
> /* List tracking the zspages in LRU order by most recently added object */
> struct list_head lru;
>
> +#ifdef CONFIG_ZPOOL
> + const struct zs_ops *ops;
> + struct zpool *zpool;
> + const struct zpool_ops *zpool_ops;
> +#endif

I really don't think I follow this zpoll_ops and zs_ops things.
Why do we have zs_ops?