函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\z3fold.c Create Date:2022-07-27 18:05:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:z3fold_create_pool() - create a new z3fold pool*@name: pool name*@gfp: gfp flags when allocating the z3fold pool structure*@ops: user-defined operations for the z3fold pool* Return: pointer to the new z3fold pool or NULL if the metadata allocation* failed.

函数原型:static struct z3fold_pool *z3fold_create_pool(const char *name, gfp_t gfp, const struct z3fold_ops *ops)

返回类型:struct z3fold_pool

参数:

类型参数名称
const char *name
gfp_tgfp
const struct z3fold_ops *ops
993  struct z3fold_pool * pool = NULL
996  pool等于分配内存并置零
997  如果非pool则转到:out
999  c_handle等于创建高速缓存区
1002  如果非c_handle则转到:out_c
1004  spin_lock_init( & lock)
1005  spin_lock_init( & stale_lock)
1006  unbuddied等于__alloc_percpu - allocate dynamic percpu area*@size: size of area to allocate in bytes*@align: alignment of area (max PAGE_SIZE)* Equivalent to __alloc_percpu_gfp(size, align, %GFP_KERNEL).
1007  如果非unbuddied则转到:out_pool
1009  遍历可用CPU(cpu)
1010  unbuddied等于per_cpu_ptr(unbuddied, cpu)
1012  for_each_unbuddied_list(i, 0)
1013  初始化链表头
1015  初始化链表头
1016  初始化链表头
1017  atomic64_set( & pages_nr, 0)
1018  name等于name
1019  compact_wq等于create_singlethread_workqueue(name)
1020  如果非compact_wq则转到:out_unbuddied
1022  release_wq等于create_singlethread_workqueue(name)
1023  如果非release_wq则转到:out_wq
1025  如果z3fold_register_migration(pool)则转到:out_rwq
1027  INIT_WORK( & work, free_pages_work)
1028  ops等于ops
1029  返回:pool
1031  out_rwq :
1032  destroy_workqueue - safely terminate a workqueue*@wq: target workqueue* Safely destroy a workqueue. All work currently pending will be done first.
1033  out_wq :
1034  destroy_workqueue - safely terminate a workqueue*@wq: target workqueue* Safely destroy a workqueue. All work currently pending will be done first.
1035  out_unbuddied :
1036  释放内存
1037  out_pool :
1038  删除高速缓存区
1039  out_c :
1040  释放内存
1041  out :
1042  返回:NULL
调用者
名称描述
z3fold_zpool_create