Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:d_css_set - return a new css_set with one cgroup updated*@old_cset: the baseline css_set*@cgrp: the cgroup to be updated* Return a new css_set that's equivalent to @old_cset, but with @cgrp* substituted into the appropriate hierarchy.

Proto:static struct css_set *find_css_set(struct css_set *old_cset, struct cgroup *cgrp)

Type:struct css_set

Parameter:

TypeParameterName
struct css_set *old_cset
struct cgroup *cgrp
1181  struct cgroup_subsys_state * template[CGROUP_SUBSYS_COUNT] = {}
1189  lockdep_assert_held( & cgroup_mutex is the master lock)
1193  spin_lock_irq( & css_set_lock)
1194  cset = d_existing_css_set - init css array and find the matching css_set*@old_cset: the css_set that we're using before the cgroup transition*@cgrp: the cgroup that we're moving into*@template: out param for the new set of csses, should be clear on entry
1195  If cset Then ed get/put for css_set objects
1197  spin_unlock_irq( & css_set_lock)
1199  If cset Then Return cset
1202  cset = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
1203  If Not cset Then Return NULL
1207  If allocate_cgrp_cset_links - allocate cgrp_cset_links*@count: the number of links to allocate*@tmp_links: list_head the allocated links are put on* Allocate @count cgrp_cset_link structures and chain them on @tmp_links* through ->cset_link < 0 Then
1208  kfree(cset)
1209  Return NULL
1212  _set - set a refcount's value*@r: the refcount*@n: value to which the refcount will be set
1213  For a domain cgroup, the following points to self. If threaded,* to the matching cset of the nearest domain ancestor. The* dom_cset provides access to the domain cgroup and its csses to* which domain level resource consumptions should be charged. = cset
1214  Initialization list head
1215  Initialization list head
1216  Initialization list head
1217  Initialization list head
1218  Initialization list head
1219  INIT_HLIST_NODE( & List running through all cgroup groups in the same hash* slot. Protected by css_set_lock)
1220  Initialization list head
1221  Initialization list head
1222  Initialization list head
1226  No 3D Now!(Set of subsystem states, one for each subsystem. This array is* immutable after creation apart from the init_css_set during* subsystem registration (at boot time)., template, size of Set of subsystem states, one for each subsystem. This array is* immutable after creation apart from the init_css_set during* subsystem registration (at boot time). )
1228  spin_lock_irq( & css_set_lock)
1231  c = he cgroup and css_set this link associates
1233  If root == root Then c = cgrp
1235  link_css_set - a helper function to link a css_set to a cgroup*@tmp_links: cgrp_cset_link objects allocated by allocate_cgrp_cset_links()*@cset: the css_set to be linked*@cgrp: the destination cgroup
1238  BUG_ON(!list_empty - tests whether a list is empty*@head: the list to test.)
1240  1 for init_css_set ++
1243  key = css_set_hash(Set of subsystem states, one for each subsystem. This array is* immutable after creation apart from the init_css_set during* subsystem registration (at boot time).)
1244  hash_add - add an object to a hashtable*@hashtable: hashtable to add to*@node: the &struct hlist_node of the object to be added*@key: the key of the object to be added(css_set_table, & List running through all cgroup groups in the same hash* slot. Protected by css_set_lock, key)
1247  css = Set of subsystem states, one for each subsystem. This array is* immutable after creation apart from the init_css_set during* subsystem registration (at boot time).[ssid]
1249  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
1251  ss_get - obtain a reference on the specified css*@css: target css* The caller must already have a reference.
1254  spin_unlock_irq( & css_set_lock)
1262  If cgroup_is_threaded(he default cgroup associated with this css_set ) Then
1265  dcset = d_css_set - return a new css_set with one cgroup updated*@old_cset: the baseline css_set*@cgrp: the cgroup to be updated* Return a new css_set that's equivalent to @old_cset, but with @cgrp* substituted into the appropriate hierarchy.
1266  If Not dcset Then
1267  put_css_set(cset)
1268  Return NULL
1271  spin_lock_irq( & css_set_lock)
1272  For a domain cgroup, the following points to self. If threaded,* to the matching cset of the nearest domain ancestor. The* dom_cset provides access to the domain cgroup and its csses to* which domain level resource consumptions should be charged. = dcset
1273  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
1275  spin_unlock_irq( & css_set_lock)
1278  Return cset
Caller
NameDescribe
find_css_setd_css_set - return a new css_set with one cgroup updated*@old_cset: the baseline css_set*@cgrp: the cgroup to be updated* Return a new css_set that's equivalent to @old_cset, but with @cgrp* substituted into the appropriate hierarchy.
cgroup_migrate_prepare_dstgroup_migrate_prepare_dst - prepare destination css_sets for migration*@mgctx: migration context* Tasks are about to be moved and all the source css_sets have been* preloaded to @mgctx->preloaded_src_csets