Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dev_pagemap_mapping_shift

Proto:static unsigned long dev_pagemap_mapping_shift(struct page *page, struct vm_area_struct *vma)

Type:unsigned long

Parameter:

TypeParameterName
struct page *page
struct vm_area_struct *vma
267  address = vma_address(page, vma)
274  pgd = a shortcut to get a pgd_t in a given mm(The address space we belong to. , address)
275  If Not pgd_present( * pgd) Then Return 0
277  p4d = p4d_offset(pgd, address)
278  If Not p4d_present( * p4d) Then Return 0
280  pud = pud_offset(p4d, address)
281  If Not pud_present( * pud) Then Return 0
283  If pud_devmap( * pud) Then Return PUD_SHIFT
285  pmd = pmd_offset(pud, address)
286  If Not pmd_present( * pmd) Then Return 0
288  If pmd_devmap( * pmd) Then Return PMD_SHIFT
290  pte = pte_offset_map(pmd, address)
291  If Not pte_present( * pte) Then Return 0
293  If pte_devmap( * pte) Then Return PAGE_SHIFT determines the page size
295  Return 0
Caller
NameDescribe
add_to_killSchedule a process for later kill.* Uses GFP_ATOMIC allocations to avoid potential recursions in the VM.