Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Force the hugetlb cgroup to empty the hugetlb resources by moving them to* the parent cgroup.

Proto:static void hugetlb_cgroup_css_offline(struct cgroup_subsys_state *css)

Type:void

Parameter:

TypeParameterName
struct cgroup_subsys_state *css
163  h_cg = hugetlb_cgroup_from_css(css)
166  idx = 0
168  Do
170  spin_lock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.)
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  spin_unlock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.)
175  idx++
177  cond_resched()
178  When hugetlb_cgroup_have_usage(h_cg) cycle