函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:group_destroy_locked - the first stage of cgroup destruction*@cgrp: cgroup to be destroyed* css's make use of percpu refcnts whose killing latency shouldn't be* exposed to userland and are RCU protected

函数原型:static int cgroup_destroy_locked(struct cgroup *cgrp)__releases(&cgroup_mutex) __acquires(&cgroup_mutex)

返回类型:int

参数:

类型参数名称
struct cgroup *cgrp
5451  parent等于cgroup_parent(cgrp)
5456  lockdep_assert_held( & cgroup_mutex is the master lock)
5462  如果 synchronization, the result can only be used as a hint 则返回:负EBUSY
5470  如果ss_has_online_children - does a css have online children*@css: the target css* Returns %true if @css has any online children; otherwise, %false. This* function can be called from any context but the caller is responsible则返回:负EBUSY
5479  flags与等于CSS_ONLINE的反
5481  spin_lock_irq( & css_set_lock)
5482  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(link, & * List of cgrp_cset_links pointing at css_sets with tasks in this * cgroup. Protected by css_set_lock., cset_link)
5483  dead and being drained, ignore for migration = true
5484  spin_unlock_irq( & css_set_lock)
5487 ssid小于CGROUP_SUBSYS_COUNT循环if (!((css) = ({
5487  union{typeof(( Private pointers for each registered subsystem [(ssid)])) __val;char __c[1];}__u
5487  循环
5487  当0循环
5487  __val
5487  })
5487  循环
5487  当0循环
5487  })))
5487  否则kill_css(css)
5491  ss_clear_dir - remove subsys files in a cgroup directory*@css: taget css
5492  kernfs_remove( cgroup kernfs entry )
5494  如果parentcgroup_is_threaded(cgrp)则 # of live threaded child cgroups 自减
5497  spin_lock_irq( & css_set_lock)
5498 tcgrp循环
5499  * Keep track of total numbers of visible and dying descent cgroups. * Dying cgroups are cgroups which were deleted by a user, * but are still existing because someone else is holding a reference. * max_descendants is a maximum allowed number of descent cgr自减
5500  nr_dying_descendants自加
5505  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Number of frozen descendant cgroups 自减
5508  spin_unlock_irq( & css_set_lock)
5510  cgroup1_check_for_release(parent)
5512  cgroup_bpf_offline(cgrp)
5515  percpu_ref_kill - drop the initial ref*@ref: percpu_ref to kill* Must be used to drop the initial ref on a percpu refcount; must be called* precisely once before shutdown.* Switches @ref into atomic mode before gathering up the percpu counters
5517  返回:0
调用者
名称描述
cgroup_mkdir
cgroup_rmdirput the base reference