函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:groupstats_build - build and fill cgroupstats*@stats: cgroupstats to fill information into*@dentry: A dentry entry belonging to the cgroup for which stats have* been requested.* Build and fill cgroupstats so that taskstats can export it to user* space.

函数原型:int cgroupstats_build(struct cgroupstats *stats, struct dentry *dentry)

返回类型:int

参数:

类型参数名称
struct cgroupstats *stats
struct dentry *dentry
692  kn等于kernfs_node_from_dentry(dentry)
698  如果s_type不等于cgroup_fs_type或非knkernfs_type(kn)不等于KERNFS_DIR则返回:负EINVAL
702  mutex_lock( & cgroup_mutex is the master lock)
709  _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
710  cgrp等于cu_dereference() - fetch RCU-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* This is a simple wrapper around rcu_dereference_check().( * (void__rcu__force * * ) & priv)
711  如果非cgrpcgroup_is_dead(cgrp)则
712  _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()
713  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
714  返回:负ENOENT
716  _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()
718  ss_task_iter_start - initiate task iteration*@css: the css to walk tasks of*@flags: CSS_TASK_ITER_* flags*@it: the task iterator to use* Initiate iteration through the tasks of @css
719 tsk等于ss_task_iter_next - return the next task for the iterator*@it: the task iterator being iterated* The "next" function for task iteration. @it should have been* initialized via css_task_iter_start(). Returns NULL when the iteration* reaches the end.循环
721  :任务状态恒等于就绪态
723  退出
724  :任务状态恒等于睡眠态
726  退出
729  退出
730  :任务状态恒等于TASK_STOPPED
732  退出
733  默认
736  退出
739  ss_task_iter_end - finish task iteration*@it: the task iterator to finish* Finish task iteration started by css_task_iter_start().
741  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
742  返回:0
调用者
名称描述
cgroupstats_user_cmd