Lines Matching refs:sgp
55 struct sg_pool *sgp; in sg_pool_free() local
57 sgp = sg_pools + sg_pool_index(nents); in sg_pool_free()
58 mempool_free(sgl, sgp->pool); in sg_pool_free()
63 struct sg_pool *sgp; in sg_pool_alloc() local
65 sgp = sg_pools + sg_pool_index(nents); in sg_pool_alloc()
66 return mempool_alloc(sgp->pool, gfp_mask); in sg_pool_alloc()
126 struct sg_pool *sgp = sg_pools + i; in sg_pool_init() local
127 int size = sgp->size * sizeof(struct scatterlist); in sg_pool_init()
129 sgp->slab = kmem_cache_create(sgp->name, size, 0, in sg_pool_init()
131 if (!sgp->slab) { in sg_pool_init()
133 sgp->name); in sg_pool_init()
137 sgp->pool = mempool_create_slab_pool(SG_MEMPOOL_SIZE, in sg_pool_init()
138 sgp->slab); in sg_pool_init()
139 if (!sgp->pool) { in sg_pool_init()
141 sgp->name); in sg_pool_init()
150 struct sg_pool *sgp = sg_pools + i; in sg_pool_init() local
151 if (sgp->pool) in sg_pool_init()
152 mempool_destroy(sgp->pool); in sg_pool_init()
153 if (sgp->slab) in sg_pool_init()
154 kmem_cache_destroy(sgp->slab); in sg_pool_init()
165 struct sg_pool *sgp = sg_pools + i; in sg_pool_exit() local
166 mempool_destroy(sgp->pool); in sg_pool_exit()
167 kmem_cache_destroy(sgp->slab); in sg_pool_exit()