Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:total_mapcount

Proto:int total_mapcount(struct page *page)

Type:int

Parameter:

TypeParameterName
struct page *page
2584  VM_BUG_ON_PAGE(PageTail(page), page)
2586  If Value is more likely to compile time(!PageCompound(page)) Then Return atomic_read( & * If the page can be mapped to userspace, encodes the number * of times this page is referenced by a page table.) + 1
2589  compound = compound_mapcount(page)
2590  If PageHuge() only returns true for hugetlbfs pages, but not for normal or* transparent huge pages. See the PageTransHuge() documentation for more* details. Then Return compound
2592  ret = compound
2593  When i < HPAGE_PMD_NR cycle ret += atomic_read( & * If the page can be mapped to userspace, encodes the number * of times this page is referenced by a page table.) + 1
2596  If Not PageAnon(page) Then Return ret - compound * HPAGE_PMD_NR
2598  If PageDoubleMap indicates that the compound page is mapped with PTEs as well* as PMDs.* This is required for optimization of rmap operations for THP: we can postpone* per small page mapcount accounting (and its overhead from atomic operations) Then ret -= HPAGE_PMD_NR
2600  Return ret
Caller
NameDescribe
page_mapcount_is_zero
can_split_huge_pageRacy check whether the huge page can be split
split_huge_page_to_listThis function splits huge page into normal pages. @page can point to any* subpage of huge page to split. Split doesn't change the position of @page.* Only caller must hold pin on the @page, otherwise split fails with -EBUSY.* The huge page must be locked.