Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:madvise_dontneed_free

Proto:static long madvise_dontneed_free(struct vm_area_struct *vma, struct vm_area_struct **prev, unsigned long start, unsigned long end, int behavior)

Type:long

Parameter:

TypeParameterName
struct vm_area_struct *vma
struct vm_area_struct **prev
unsigned longstart
unsigned longend
intbehavior
759  prev = vma
760  If Not can_madv_lru_vma(vma) Then Return -EINVAL
763  If Not userfaultfd_remove(vma, start, end) Then
764  * prev = NULL
766  lock for reading
767  vma = Look up the first VMA which satisfies addr < vm_end, NULL if none.
768  If Not vma Then Return -ENOMEM
780  Return -ENOMEM
782  If Not can_madv_lru_vma(vma) Then Return -EINVAL
799  VM_WARN_ON(start >= end)
802  If behavior == don't need these pages Then Return Application no longer needs these pages
804  Else if behavior == pages only if memory pressure Then Return madvise_free_single_vma(vma, start, end)
806  Else Return -EINVAL
Caller
NameDescribe
madvise_vma