Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static void hugetlb_cgroup_move_parent(int idx, struct hugetlb_cgroup *h_cg, struct page *page)

Type:void

Parameter:

TypeParameterName
intidx
struct hugetlb_cgroup *h_cg
struct page *page
131  parent = parent_hugetlb_cgroup(h_cg)
133  page_hcg = hugetlb_cgroup_from_page(page)
139  If Not page_hcg || page_hcg != h_cg Then Go to out
142  nr_pages = Returns the number of pages in this potentially compound page.
143  If Not parent Then
144  parent = root_h_cgroup
146  page_counter_charge - hierarchically charge pages*@counter: counter*@nr_pages: number of pages to charge* NOTE: This does not consider any configured counter limits.
148  counter = * the counter to account for hugepages from hugetlb.[idx]
150  page_counter_cancel - take pages out of the local counter*@counter: counter*@nr_pages: number of pages to cancel
152  set_hugetlb_cgroup(page, parent)
153  out :
154  Return
Caller
NameDescribe
hugetlb_cgroup_css_offlineForce the hugetlb cgroup to empty the hugetlb resources by moving them to* the parent cgroup.