函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:padata_do_parallel - padata parallelization function*@ps: padatashell*@padata: object to be parallelized*@cb_cpu: pointer to the CPU that the serialization callback function should* run on. If it's not in the serial cpumask of @pinst* (i

函数原型:int padata_do_parallel(struct padata_shell *ps, struct padata_priv *padata, int *cb_cpu)

返回类型:int

参数:

类型参数名称
struct padata_shell *ps
struct padata_priv *padata
int *cb_cpu
106  pinst等于pinst
111  _read_lock_bh() - mark the beginning of an RCU-bh critical section* This is equivalent of rcu_read_lock(), but also disables softirqs
113  pd等于cu_dereference_bh() - fetch an RCU-bh-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* Makes rcu_dereference_check() do the dirty work.(pd)
115  err等于负EINVAL
116  如果非flags按位与PADATA_INIT的值或flags按位与PADATA_INVALID则转到:out
119  如果非测试CPU信息
120  如果非pumask_weight - Count of bits in *srcp*@srcp: the cpumask to count bits (< nr_cpu_ids) in.则转到:out
124  cpu_index等于cb_cpu取模pumask_weight - Count of bits in *srcp*@srcp: the cpumask to count bits (< nr_cpu_ids) in.
126  cpu等于Uniprocessor. Assume all masks are "1".
127 i小于cpu_index循环cpu等于pumask_next - get the next cpu in a cpumask*@n: the cpu prior to the place to search (ie. return will be > @n)*@srcp: the cpumask pointer* Returns >= nr_cpu_ids if no further cpus set.
130  cb_cpu等于cpu
133  err等于负EBUSY
134  如果flags按位与PADATA_RESET则转到:out
137  如果atomic_read( & refcnt)大于等于MAX_OBJ_NUM则转到:out
140  err等于0
141  atomic_inc( & refcnt)
142  pd等于pd
143  cb_cpu等于cb_cpu
145  seq_nr等于atomic_inc_return( & seq_nr)
146  target_cpu等于padata_cpu_hash(pd, seq_nr)
147  cpu等于target_cpu
148  queue等于per_cpu_ptr(pqueue, target_cpu)
150  加自旋锁
151  添加链表项
152  自旋锁解锁
154  queue_work - queue work on a workqueue*@wq: workqueue to use*@work: work to queue* Returns %false if @work was already on a queue, %true otherwise.* We queue the work to the CPU on which it was submitted, but if the CPU dies
156  out :
157  标记rcu锁结束的软中断
159  返回:err