函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Force the hugetlb cgroup to empty the hugetlb resources by moving them to* the parent cgroup.

函数原型:static void hugetlb_cgroup_css_offline(struct cgroup_subsys_state *css)

返回类型:void

参数:

类型参数名称
struct cgroup_subsys_state *css
163  h_cg等于hugetlb_cgroup_from_css(css)
166  idx等于0
168  循环
170  加自旋锁
171  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.(page, & hugepage_activelist, lru)
172  Should be called with hugetlb_lock held.* Since we are holding hugetlb_lock, pages cannot get moved from* active list or uncharged from the cgroup, So no need to get* page reference and test for page active here. This function* cannot fail.
174  自旋锁解锁
175  idx自加
177  cond_resched()
178 hugetlb_cgroup_have_usage(h_cg)循环