函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\gup.c Create Date:2022-07-27 16:01:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__mm_populate - populate and/or mlock pages within a range of address space.* This is used to implement mlock() and the MAP_POPULATE / MAP_LOCKED mmap* flags. VMAs must be already marked with the desired vm_flags, and* mmap_sem must not be held.

函数原型:int __mm_populate(unsigned long start, unsigned long len, int ignore_errors)

返回类型:int

参数:

类型参数名称
unsigned longstart
unsigned longlen
intignore_errors
1248  mm等于mm
1250  struct vm_area_struct * vma = NULL
1251  locked等于0
1252  ret等于0
1254  end等于startlen
1256 nstart小于end循环
1261  如果非locked
1262  locked等于1
1265  否则如果nstart大于等于The first byte after our end addresswithin vm_mm. vma等于linked list of VM areas per task, sorted by address
1267  如果非vmaOur start address within vm_mm. 大于等于end退出
1273  nend等于两数取小(end, The first byte after our end addresswithin vm_mm. )
1274  如果Flags, see mm.h. 按位与Memory mapped I/O or similar 按位或Page-ranges managed without "struct page", just pure PFN 的值则继续下一循环
1276  如果nstart小于Our start address within vm_mm. nstart等于Our start address within vm_mm.
1283  ret等于populate_vma_page_range() - populate a range of pages in the vma
1284  如果ret小于0则
1285  如果ignore_errors
1286  ret等于0
1287  继续下一循环
1289  退出
1291  nend等于nstartretPAGE_SIZE
1292  ret等于0
1294  如果lockedlease a read lock
1296  返回:ret
调用者
名称描述
do_mlock
mm_populate