Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static int cgroup_destroy_locked(struct cgroup *cgrp)__releases(&cgroup_mutex) __acquires(&cgroup_mutex)

Type:int

Parameter:

TypeParameterName
struct cgroup *cgrp
5451  parent = cgroup_parent(cgrp)
5456  lockdep_assert_held( & cgroup_mutex is the master lock)
5462  If synchronization, the result can only be used as a hint Then Return -EBUSY
5470  If 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 Then Return -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  When ssid < CGROUP_SUBSYS_COUNT cycle if (!((css) = ({
5487  union{typeof(( Private pointers for each registered subsystem [(ssid)])) __val;char __c[1];}__u
5487  Do
5487  When 0 cycle
5487  __val
5487  })
5487  Do
5487  When 0 cycle
5487  })))
5487  Else kill_css(css)
5491  ss_clear_dir - remove subsys files in a cgroup directory*@css: taget css
5492  kernfs_remove( cgroup kernfs entry )
5494  If parent && cgroup_is_threaded(cgrp) Then # of live threaded child cgroups --
5497  spin_lock_irq( & css_set_lock)
5498  When tcgrp cycle
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  If st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then 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  Return 0
Caller
NameDescribe
cgroup_mkdir
cgroup_rmdirput the base reference