Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mpare_css_sets - helper function for find_existing_css_set()

Proto:static bool compare_css_sets(struct css_set *cset, struct css_set *old_cset, struct cgroup *new_cgrp, struct cgroup_subsys_state *template[])

Type:bool

Parameter:

TypeParameterName
struct css_set *cset
struct css_set *old_cset
struct cgroup *new_cgrp
struct cgroup_subsys_state *template
993  If memcmp(template, 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)., 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). ) Then Return false
998  If group_on_dfl - test whether a cgroup is on the default hierarchy*@cgrp: the cgroup of interest* The default hierarchy is the v2 interface of cgroup and this function* can be used to test whether a cgroup is on the default hierarchy for* cases where a Then new_dfl_cgrp = new_cgrp
1000  Else new_dfl_cgrp = he default cgroup associated with this css_set
1003  If * If !threaded, self. If threaded, it points to the nearest * domain ancestor. Inside a threaded subtree, cgroups are exempt * from process granularity and no-internal-task constraint. * Domain level resource consumptions which aren't tied to a * specific != he default cgroup associated with this css_set Then Return false
1012  l1 = List of cgrp_cset_links pointing at cgroups referenced from this* css_set. Protected by css_set_lock.
1013  l2 = List of cgrp_cset_links pointing at cgroups referenced from this* css_set. Protected by css_set_lock.
1014  When 1 cycle
1018  l1 = next
1019  l2 = next
1023  Break
1024  Else
1028  link1 = list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(l1, structcgrp_cset_link, cgrp_link)
1029  link2 = list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(l2, structcgrp_cset_link, cgrp_link)
1030  cgrp1 = he cgroup and css_set this link associates
1031  cgrp2 = he cgroup and css_set this link associates
1033  BUG_ON(root != root)
1042  If root == root Then
1043  If cgrp1 != new_cgrp Then Return false
1045  Else
1046  If cgrp1 != cgrp2 Then Return false
1050  Return true
Caller
NameDescribe
find_existing_css_setd_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