Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:current_css_set_read

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

Type:int

Parameter:

TypeParameterName
struct seq_file *seq
void *v
42  of = private
48  If Not group_kn_lock_live - locking helper for cgroup kernfs methods*@kn: the kernfs_node being serviced*@drain_offline: perform offline draining on the cgroup* This helper is to be used by a cgroup kernfs method currently servicing*@kn Then Return -ENODEV
51  spin_lock_irq( & css_set_lock)
52  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
53  cset = ask_css_set - obtain a task's css_set*@task: the task to obtain css_set for* See task_css_set_check().
54  refcnt = _read - get a refcount's value*@r: the refcount* Return: the refcount's value
55  seq_printf(seq, "css_set %pK %d", cset, refcnt)
56  If refcnt > rnal task count, protected by css_set_lock Then seq_printf(seq, " +%d", refcnt - rnal task count, protected by css_set_lock )
58  seq_puts(seq, "\n")
64  css = Set of subsystem states, one for each subsystem. This array is* immutable after creation apart from the init_css_set during* subsystem registration (at boot time).[ the following two fields are initialized automtically during boot ]
65  If Not css Then Continue
67  seq_printf(seq, "%2d: %-4s\t- %p[%d]\n", the following two fields are initialized automtically during boot , name, css, PI: Subsys-unique ID. 0 is unused and root is always 1. The* matching css can be looked up using css_from_id().)
70  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
71  spin_unlock_irq( & css_set_lock)
72  group_kn_unlock - unlocking helper for cgroup kernfs methods*@kn: the kernfs_node being serviced* This helper undoes cgroup_kn_lock_live() and should be invoked before* the method finishes if locking succeeded
73  Return 0