Lines Matching refs:sgp
56 struct sg_pool *sgp; in sg_pool_free() local
58 sgp = sg_pools + sg_pool_index(nents); in sg_pool_free()
59 mempool_free(sgl, sgp->pool); in sg_pool_free()
64 struct sg_pool *sgp; in sg_pool_alloc() local
66 sgp = sg_pools + sg_pool_index(nents); in sg_pool_alloc()
67 return mempool_alloc(sgp->pool, gfp_mask); in sg_pool_alloc()
147 struct sg_pool *sgp = sg_pools + i; in sg_pool_init() local
148 int size = sgp->size * sizeof(struct scatterlist); in sg_pool_init()
150 sgp->slab = kmem_cache_create(sgp->name, size, 0, in sg_pool_init()
152 if (!sgp->slab) { in sg_pool_init()
154 sgp->name); in sg_pool_init()
158 sgp->pool = mempool_create_slab_pool(SG_MEMPOOL_SIZE, in sg_pool_init()
159 sgp->slab); in sg_pool_init()
160 if (!sgp->pool) { in sg_pool_init()
162 sgp->name); in sg_pool_init()
171 struct sg_pool *sgp = sg_pools + i; in sg_pool_init() local
173 mempool_destroy(sgp->pool); in sg_pool_init()
174 kmem_cache_destroy(sgp->slab); in sg_pool_init()