函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cgroup_css_links_read

函数原型:static int cgroup_css_links_read(struct seq_file *seq, void *v)

返回类型:int

参数:

类型参数名称
struct seq_file *seq
void *v
116  css等于seq_css(seq)
118  dead_cnt等于0, extra_refs等于0, threaded_csets等于0
120  spin_lock_irq( & css_set_lock)
123  cset等于cset
125  count等于0
126  refcnt等于_read - get a refcount's value*@r: the refcount* Return: the refcount's value
132  seq_printf(seq, "css_set %pK", cset)
133  如果cu_dereference_protected() - fetch RCU pointer when updates prevented*@p: The pointer to read, prior to dereferencing*@c: The conditions under which the dereference will take place* Return the value of the specified RCU-protected pointer, but omit(For a domain cgroup, the following points to self. If threaded,* to the matching cset of the nearest domain ancestor. The* dom_cset provides access to the domain cgroup and its csses to* which domain level resource consumptions should be charged., 1)不等于cset
134  threaded_csets自加
135  seq_printf(seq, "=>%pK", For a domain cgroup, the following points to self. If threaded,* to the matching cset of the nearest domain ancestor. The* dom_cset provides access to the domain cgroup and its csses to* which domain level resource consumptions should be charged.)
137  如果非链表为空
139  idx等于0
143  seq_puts(seq, idx ? "," : "<=")
144  seq_printf(seq, "%pK", tcset)
145  idx自加
147  否则
148  seq_printf(seq, " %d", refcnt)
152  seq_printf(seq, " +%d", extra)
159  extra_refs加等于extra
162  seq_puts(seq, "\n")
165  如果count自加小于等于MAX_TASKS_SHOWN_PER_CSSseq_printf(seq, " task %d\n", task_pid_vnr(task))
171  如果count自加小于等于MAX_TASKS_SHOWN_PER_CSSseq_printf(seq, " task %d\n", task_pid_vnr(task))
176  如果count大于MAX_TASKS_SHOWN_PER_CSSseq_printf(seq, " ... (%d)\n", count - MAX_TASKS_SHOWN_PER_CSS)
180  如果dead and being drained, ignore for migration
181  seq_puts(seq, " [dead]\n")
182  dead_cnt自加
185  WARN_ON(count != rnal task count, protected by css_set_lock )
187  spin_unlock_irq( & css_set_lock)
189  如果非dead_cnt且非extra_refs且非threaded_csets则返回:0
192  seq_puts(seq, "\n")
193  如果threaded_csetsseq_printf(seq, "threaded css_sets = %d\n", threaded_csets)
195  如果extra_refsseq_printf(seq, "extra references = %d\n", extra_refs)
197  如果dead_cntseq_printf(seq, "dead css_sets = %d\n", dead_cnt)
200  返回:0