Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mlock.c Create Date:2022-07-28 14:45:48
Last Modify:2022-05-23 14:12:58 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Go through vma areas and sum size of mlocked* vma pages, as return value.* Note deferred memory locking case(mlock2(,,MLOCK_ONFAULT)* is also counted.* Return value: previously mlocked page counts

Proto:static unsigned long count_mm_mlocked_page_nr(struct mm_struct *mm, unsigned long start, size_t len)

Type:unsigned long

Parameter:

TypeParameterName
struct mm_struct *mm
unsigned longstart
size_tlen
643  count = 0
645  If (mm == NULL) Then mm = mm
648  vma = Look up the first VMA which satisfies addr < vm_end, NULL if none.
649  If (vma == NULL) Then vma = list of VMAs
652  When vma cycle
653  If start >= The first byte after our end addresswithin vm_mm. Then Continue
655  If start + len <= Our start address within vm_mm. Then Break
657  If Flags, see mm.h. & VM_LOCKED Then
668  Return count >> PAGE_SHIFT determines the page size
Caller
NameDescribe
do_mlock