Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mempolicy.c Create Date:2022-07-28 15:31:19
Last Modify:2020-03-17 22:28:11 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Apply policy to a single VMA* This must be called with the mmap_sem held for writing.

Proto:static int vma_replace_policy(struct vm_area_struct *vma, struct mempolicy *pol)

Type:int

Parameter:

TypeParameterName
struct vm_area_struct *vma
struct mempolicy *pol
721  pr_debug("vma %lx-%lx/%lx vm_ops %p vm_file %p set_policy %p\n", Our start address within vm_mm. , The first byte after our end addresswithin vm_mm. , Offset (within vm_file) in PAGE_SIZEunits , Function pointers to deal with this struct. , File we map to (can be NULL). , Function pointers to deal with this struct. ? set_policy : NULL)
726  new = mpol_dup(pol)
727  If IS_ERR(new) Then Return PTR_ERR(new)
730  If Function pointers to deal with this struct. && set_policy Then
731  err = set_policy(vma, new)
732  If err Then Go to err_out
736  old = NUMA policy for the VMA
737  NUMA policy for the VMA = new
738  mpol_put(old)
740  Return 0
741  err_out :
742  mpol_put(new)
743  Return err
Caller
NameDescribe
mbind_rangeStep 2: apply policy to a range and do splits.