函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:group_lock_and_drain_offline - lock cgroup_mutex and drain offlined csses*@cgrp: root of the target subtree* Because css offlining is asynchronous, userland may try to re-enable a* controller while the previous css is still around. This function grabs

函数原型:void cgroup_lock_and_drain_offline(struct cgroup *cgrp)__acquires(&cgroup_mutex)

返回类型:void

参数:

类型参数名称
struct cgroup *cgrp
2936  restart :
2937  mutex_lock( & cgroup_mutex is the master lock)
2939  walk live descendants in postorder (dsct, d_css, cgrp)
2941  css等于group_css - obtain a cgroup's css for the specified subsystem*@cgrp: the cgroup of interest*@ss: the subsystem of interest (%NULL returns @cgrp->self)* Return @cgrp's css (cgroup_subsys_state) associated with @ss
2942  DEFINE_WAIT(wait)
2944  如果非css或非percpu_ref_is_dying - test whether a percpu refcount is dying or dead*@ref: percpu_ref to test* Returns %true if @ref is dying or dead.* This function is safe to call as long as @ref is between init and exit则继续下一循环
2947  cgroup_get_live(dsct)
2948  Note: we use "set_current_state()" _after_ the wait-queue add,* because we need a memory barrier there on SMP, so that any* wake-function that tests for the wait-queue being active* will be guaranteed to see waitqueue addition _or_ subsequent
2951  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.
2952  进程调度
2953  sh_wait - clean up after waiting in a queue*@wq_head: waitqueue waited on*@wq_entry: wait descriptor* Sets current thread back to running state and removes* the wait descriptor from the given waitqueue if still* queued.
2955  cgroup_put(dsct)
2956  转到:restart
调用者
名称描述
cgroup_destroy_root
cgroup_kn_lock_livegroup_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
cgroup1_reconfigure
cgroup1_get_tree