Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cgroup\debug.c Create Date:2022-07-28 11:18:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cgroup_css_links_read

Proto:static int cgroup_css_links_read(struct seq_file *seq, void *v)

Type:int

Parameter:

TypeParameterName
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  If 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 Then
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  If Not list_empty - tests whether a list is empty*@head: the list to test. Then
139  idx = 0
143  seq_puts(seq, idx ? "," : "<=")
144  seq_printf(seq, "%pK", tcset)
145  idx++
147  Else
148  seq_printf(seq, " %d", refcnt)
152  seq_printf(seq, " +%d", extra)
159  extra_refs += extra
162  seq_puts(seq, "\n")
165  If count++ <= MAX_TASKS_SHOWN_PER_CSS Then seq_printf(seq, " task %d\n", task_pid_vnr(task))
171  If count++ <= MAX_TASKS_SHOWN_PER_CSS Then seq_printf(seq, " task %d\n", task_pid_vnr(task))
176  If count > MAX_TASKS_SHOWN_PER_CSS Then seq_printf(seq, " ... (%d)\n", count - MAX_TASKS_SHOWN_PER_CSS)
180  If dead and being drained, ignore for migration Then
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  If Not dead_cnt && Not extra_refs && Not threaded_csets Then Return 0
192  seq_puts(seq, "\n")
193  If threaded_csets Then seq_printf(seq, "threaded css_sets = %d\n", threaded_csets)
195  If extra_refs Then seq_printf(seq, "extra references = %d\n", extra_refs)
197  If dead_cnt Then seq_printf(seq, "dead css_sets = %d\n", dead_cnt)
200  Return 0