函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mempolicy.c Create Date:2022-07-27 17:04:00
Last Modify:2020-03-17 22:28:11 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Apply policy to a single VMA* This must be called with the mmap_sem held for writing.

函数原型:static int vma_replace_policy(struct vm_area_struct *vma, struct mempolicy *pol)

返回类型:int

参数:

类型参数名称
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  如果是错误则返回:错误
730  如果Function pointers to deal with this struct. set_policy
731  err等于set_policy(vma, new)
732  如果err则转到:err_out
736  old等于NUMA policy for the VMA
737  NUMA policy for the VMA 等于new
738  mpol_put(old)
740  返回:0
741  err_out :
742  mpol_put(new)
743  返回:err
调用者
名称描述
mbind_rangeStep 2: apply policy to a range and do splits.