zs_pool
struct zs_pool *mem_pool;
struct zs_pool;
struct zs_pool *zs_create_pool(const char *name);
void zs_destroy_pool(struct zs_pool *pool);
unsigned long zs_malloc(struct zs_pool *pool, size_t size, gfp_t flags,
void zs_free(struct zs_pool *pool, unsigned long obj);
size_t zs_huge_class_size(struct zs_pool *pool);
unsigned long zs_get_total_pages(struct zs_pool *pool);
unsigned long zs_compact(struct zs_pool *pool);
unsigned int zs_lookup_class_index(struct zs_pool *pool, unsigned int size);
void zs_pool_stats(struct zs_pool *pool, struct zs_pool_stats *stats);
void *zs_obj_read_begin(struct zs_pool *pool, unsigned long handle,
void zs_obj_read_end(struct zs_pool *pool, unsigned long handle,
void zs_obj_read_sg_begin(struct zs_pool *pool, unsigned long handle,
void zs_obj_read_sg_end(struct zs_pool *pool, unsigned long handle);
void zs_obj_write(struct zs_pool *pool, unsigned long handle,
unsigned int zs_lookup_class_index(struct zs_pool *pool, unsigned int size)
unsigned long zs_get_total_pages(struct zs_pool *pool)
void *zs_obj_read_begin(struct zs_pool *pool, unsigned long handle,
void zs_obj_read_end(struct zs_pool *pool, unsigned long handle,
void zs_obj_read_sg_begin(struct zs_pool *pool, unsigned long handle,
void zs_obj_read_sg_end(struct zs_pool *pool, unsigned long handle)
void zs_obj_write(struct zs_pool *pool, unsigned long handle,
size_t zs_huge_class_size(struct zs_pool *pool)
static unsigned long obj_malloc(struct zs_pool *pool,
unsigned long zs_malloc(struct zs_pool *pool, size_t size, gfp_t gfp,
void zs_free(struct zs_pool *pool, unsigned long handle)
static void migrate_zspage(struct zs_pool *pool, struct zspage *src_zspage,
struct zs_pool *pool;
struct zs_pool *pool = container_of(work, struct zs_pool,
static void kick_deferred_free(struct zs_pool *pool)
static void zs_flush_migration(struct zs_pool *pool)
static void init_deferred_free(struct zs_pool *pool)
static void SetZsPageMovable(struct zs_pool *pool, struct zspage *zspage)
static inline void zs_flush_migration(struct zs_pool *pool) { }
static unsigned long __zs_compact(struct zs_pool *pool,
unsigned long zs_compact(struct zs_pool *pool)
void zs_pool_stats(struct zs_pool *pool, struct zs_pool_stats *stats)
struct zs_pool *pool = shrinker->private_data;
struct zs_pool *pool = shrinker->private_data;
static void zs_unregister_shrinker(struct zs_pool *pool)
static int zs_register_shrinker(struct zs_pool *pool)
struct zs_pool *zs_create_pool(const char *name)
struct zs_pool *pool;
void zs_destroy_pool(struct zs_pool *pool)
struct zs_pool *pool;
static void kick_deferred_free(struct zs_pool *pool);
static void init_deferred_free(struct zs_pool *pool);
static void SetZsPageMovable(struct zs_pool *pool, struct zspage *zspage);
static void kick_deferred_free(struct zs_pool *pool) {}
static void init_deferred_free(struct zs_pool *pool) {}
static void SetZsPageMovable(struct zs_pool *pool, struct zspage *zspage) {}
static struct size_class *zspage_class(struct zs_pool *pool,
struct zs_pool *pool = s->private;
static void zs_pool_stat_create(struct zs_pool *pool, const char *name)
static void zs_pool_stat_destroy(struct zs_pool *pool)
static inline void zs_pool_stat_create(struct zs_pool *pool, const char *name)
static inline void zs_pool_stat_destroy(struct zs_pool *pool)
static void __free_zspage(struct zs_pool *pool, struct size_class *class,
static void free_zspage(struct zs_pool *pool, struct size_class *class,
static struct zspage *alloc_zspage(struct zs_pool *pool,
zs_free(pool->zs_pool, entry->handle);
struct zs_pool *zs_pool;
pool->zs_pool = zs_create_pool(name);
if (!pool->zs_pool)
if (pool->zs_pool)
zs_destroy_pool(pool->zs_pool);
zs_destroy_pool(pool->zs_pool);
total += zs_get_total_pages(pool->zs_pool);
zs_free(entry->pool->zs_pool, entry->handle);
handle = zs_malloc(pool->zs_pool, dlen, gfp, page_to_nid(page));
zs_obj_write(pool->zs_pool, handle, dst, dlen);
zs_obj_read_sg_begin(pool->zs_pool, entry->handle, input, entry->length);
zs_obj_read_sg_end(pool->zs_pool, entry->handle);