Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__collapse_huge_page_isolate

Proto:static int __collapse_huge_page_isolate(struct vm_area_struct *vma, unsigned long address, pte_t *pte)

Type:int

Parameter:

TypeParameterName
struct vm_area_struct *vma
unsigned longaddress
pte_t *pte
536  struct page * page = NULL
538  none_or_zero = 0 , result = 0 , referenced = 0
539  bool writable = false
541  When _pte < pte + HPAGE_PMD_NR cycle
543  pteval = _pte
548  Continue
549  Else
551  Go to out
554  If Not pte_present(pteval) Then
556  Go to out
558  page = vm_normal_page -- This function gets the "struct page" associated with a pte.* "Special" mappings do not wish to be associated with a "struct page" (either* it doesn't exist, or it exists but they don't want to touch it). In this
561  Go to out
565  If PageCompound(page) Then
567  Go to out
570  VM_BUG_ON_PAGE(!PageAnon(page), page)
580  Go to out
588  If page_count(page) != 1 + PageSwapCache(page) Then
591  Go to out
593  If pte_write(pteval) Then
594  writable = true
595  Else
615  Go to out
617  inc_node_page_state(page, Temporary isolated pages from anon lru + page_is_file_cache - should the page be on a file LRU or anon LRU?*@page: the page to test* Returns 1 if @page is page cache page backed by a regular filesystem,* or 0 if @page is anonymous, tmpfs or otherwise ram or swap backed)
619  VM_BUG_ON_PAGE(!PageLocked(page), page)
620  VM_BUG_ON_PAGE(PageLRU(page), page)
623  If pte_young(pteval) || page_is_young(page) || PageReferenced(page) || mmu_notifier_test_young(The address space we belong to. , address) Then referenced++
628  If Value is more likely to compile time(writable) Then
633  Return 1
635  Else
636  result = SCAN_PAGE_RO
639  out :
640  release_pte_pages(pte, _pte)
641  trace_mm_collapse_huge_page_isolate(page, none_or_zero, referenced, writable, result)
643  Return 0
Caller
NameDescribe
collapse_huge_page