Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cgroup_subsys_states_read

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

Type:int

Parameter:

TypeParameterName
struct seq_file *seq
void *v
205  of = private
212  cgrp = 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
213  If Not cgrp Then Return -ENODEV
217  css = cu_dereference_check() - rcu_dereference with debug checking*@p: The pointer to read, prior to dereferencing*@c: The conditions under which the dereference will take place* Do an rcu_dereference(), but check that the conditions under which the( Private pointers for each registered subsystem [ the following two fields are initialized automtically during boot ], true)
218  If Not css Then Continue
221  pbuf[0] = '\0'
224  If PI: the parent css. Placed here for cache proximity to following* fields of the containing structure. Then snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
227  seq_printf(seq, "%2d: %-4s\t- %p[%d] %d%s\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()., atomic_read( & Incremented by online self and children. Used to guarantee that* parents are not offlined before their children.), pbuf)
232  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
233  Return 0