Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__basepage_index

Proto:unsigned long __basepage_index(struct page *page)

Type:unsigned long

Parameter:

TypeParameterName
struct page *page
1321  page_head = compound_head(page)
1322  index = Return the pagecache index of the passed page. Regular pagecache pages* use ->index whereas swapcache pages use swp_offset(->private)
1325  If Not PageHuge() only returns true for hugetlbfs pages, but not for normal or* transparent huge pages. See the PageTransHuge() documentation for more* details. Then Return Return the pagecache index of the passed page. Regular pagecache pages* use ->index whereas swapcache pages use swp_offset(->private)
1328  If compound_order(page_head) >= Free memory management - zoned buddy allocator. Then compound_idx = page_to_pfn(page) - page_to_pfn(page_head)
1330  Else compound_idx = page - page_head
1333  Return (index << compound_order(page_head)) + compound_idx
Caller
NameDescribe
basepage_indexReturn page->index in PAGE_SIZE units