函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mpare_css_sets - helper function for find_existing_css_set()

函数原型:static bool compare_css_sets(struct css_set *cset, struct css_set *old_cset, struct cgroup *new_cgrp, struct cgroup_subsys_state *template[])

返回类型:bool

参数:

类型参数名称
struct css_set *cset
struct css_set *old_cset
struct cgroup *new_cgrp
struct cgroup_subsys_state *template
993  如果内存比较则返回:false
998  如果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 new_dfl_cgrp等于new_cgrp
1000  否则new_dfl_cgrp等于he default cgroup associated with this css_set
1003  如果* 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 则返回: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  当1循环
1018  l1等于链表后项
1019  l2等于链表后项
1023  退出
1024  否则
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  如果root恒等于root
1043  如果cgrp1不等于new_cgrp则返回:false
1045  否则
1046  如果cgrp1不等于cgrp2则返回:false
1050  返回:true
调用者
名称描述
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