Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Take the MCL_* flags passed into mlockall (or 0 if called from munlockall)* and translate into the appropriate modifications to mm->def_flags and/or the* flags for all current VMAs.* There are a couple of subtleties with this

Proto:static int apply_mlockall_flags(int flags)

Type:int

Parameter:

TypeParameterName
intflags
765  struct vm_area_struct * vma, * prev = NULL
766  to_add = 0
768  def_flags &= This mask is used to clear all the VMA flags used by mlock
769  If flags & lock all future mappings Then
770  def_flags |= VM_LOCKED
772  If flags & lock all pages that are faulted in Then def_flags |= Lock the pages covered when they are faulted in
775  If Not (flags & lock all current mappings ) Then Go to out
779  If flags & lock all current mappings Then
780  to_add |= VM_LOCKED
781  If flags & lock all pages that are faulted in Then to_add |= Lock the pages covered when they are faulted in
785  When vma cycle
788  newflags = Flags, see mm.h. & This mask is used to clear all the VMA flags used by mlock
789  newflags |= to_add
792  mlock_fixup - handle mlock[all]/munlock[all] requests.* Filters out "special" vmas -- VM_LOCKED never gets set for these, and* munlock is a no-op. However, for some special vmas, we go ahead and* populate the ptes.
793  cond_resched()
795  out :
796  Return 0
Caller
NameDescribe
SYSCALL_DEFINE1
sys_munlockall