Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\sg_pool.c Create Date:2022-07-28 07:20:34
Last Modify:2022-05-21 18:25:42 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:sg_pool_init

Proto:static __init int sg_pool_init(void)

Type:int

Parameter:Nothing

145  When i < SG_MEMPOOL_NR cycle
146  sgp = sg_pools + i
147  size = size * sizeof(structscatterlist)
149  slab = kmem_cache_create(name, size, 0, Align objs on cache lines , NULL)
151  If Not slab Then
152  printk(r conditions "SG_POOL: can't init sg slab %s\n", name)
154  Go to cleanup_sdb
157  pool = mempool_create_slab_pool(SG_MEMPOOL_SIZE, slab)
159  If Not pool Then
160  printk(r conditions "SG_POOL: can't init sg mempool %s\n", name)
162  Go to cleanup_sdb
166  Return 0
168  cleanup_sdb :
169  When i < SG_MEMPOOL_NR cycle
170  sgp = sg_pools + i
172  mempool_destroy(pool)
173  kmem_cache_destroy(slab)
176  Return -ENOMEM