Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:hugetlb_lock will make sure a parallel cgroup rmdir won't happen* when we migrate hugepages

Proto:void hugetlb_cgroup_migrate(struct page *oldhpage, struct page *newhpage)

Type:void

Parameter:

TypeParameterName
struct page *oldhpage
struct page *newhpage
419  h = page_hstate(oldhpage)
421  If hugetlb_cgroup_disabled() Then Return
424  VM_BUG_ON_PAGE(!PageHuge() only returns true for hugetlbfs pages, but not for normal or* transparent huge pages. See the PageTransHuge() documentation for more* details., oldhpage)
425  spin_lock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.)
426  h_cg = hugetlb_cgroup_from_page(oldhpage)
427  set_hugetlb_cgroup(oldhpage, NULL)
430  set_hugetlb_cgroup(newhpage, h_cg)
431  list_move - delete from one list and add as another's head*@list: the entry to move*@head: the head that will precede our entry
432  spin_unlock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.)
433  Return
Caller
NameDescribe
move_hugetlb_state