Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:walk_page_range - walk page table with caller specific callbacks*@mm: mm_struct representing the target process of page table walk*@start: start address of the virtual address range*@end: end address of the virtual address range*@ops: operation to call

Proto:int walk_page_range(struct mm_struct *mm, unsigned long start, unsigned long end, const struct mm_walk_ops *ops, void *private)

Type:int

Parameter:

TypeParameterName
struct mm_struct *mm
unsigned longstart
unsigned longend
const struct mm_walk_ops *ops
void *private
321  err = 0
324  struct mm_walk walk = {ops = ops, mm = mm, private = private, }
330  If start >= end Then Return -EINVAL
333  If Not mm Then Return -EINVAL
336  lockdep_assert_held( & mmap_sem)
338  vma = Look up the first VMA which satisfies addr < vm_end, NULL if none.
339  Do
340  If Not vma Then
341  vma = NULL
342  next = end
344  vma = NULL
346  Else
347  vma = vma
352  If err > 0 Then
358  err = 0
359  Continue
361  If err < 0 Then Break
364  If vma || pte_hole Then err = __walk_page_range(start, next, & walk)
366  If err Then Break
368  When start = next , start < end cycle
369  Return err
Caller
NameDescribe
mprotect_fixup
madvise_cold_page_range
madvise_pageout_page_range
madvise_free_single_vma
queue_pages_rangeWalk through page tables and collect pages to be migrated
mem_cgroup_count_precharge
mem_cgroup_move_charge
hmm_range_faulthmm_range_fault - try to fault some address in a virtual address range*@range: range being faulted*@flags: HMM_FAULT_* flags* Return: the number of valid pages in range->pfns[] (from range start* address), which may be zero