函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\madvise.c Create Date:2022-07-27 16:42:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:We can potentially split a vm area into separate* areas, each area with its own behavior.

函数原型:static long madvise_behavior(struct vm_area_struct *vma, struct vm_area_struct **prev, unsigned long start, unsigned long end, int behavior)

返回类型:long

参数:

类型参数名称
struct vm_area_struct *vma
struct vm_area_struct **prev
unsigned longstart
unsigned longend
intbehavior
69  mm等于The address space we belong to.
70  error等于0
72  new_flags等于Flags, see mm.h.
75  :behavior恒等于 further special treatment
76  new_flags等于new_flags按位与App will not benefit from clustered reads 的反按位与App will access data sequentially 的反
77  退出
78  :behavior恒等于xpect sequential page references
79  new_flags等于new_flags按位与App will not benefit from clustered reads 的反按位或App will access data sequentially
80  退出
81  :behavior恒等于xpect random page references
82  new_flags等于new_flags按位与App will access data sequentially 的反按位或App will not benefit from clustered reads
83  退出
84  :behavior恒等于don't inherit across fork
85  new_flags或等于Do not copy this vma on fork
86  退出
87  :behavior恒等于do inherit across fork
89  error等于负EINVAL
90  转到:out
92  new_flags与等于Do not copy this vma on fork 的反
93  退出
94  :behavior恒等于Zero memory on fork, child only
97  error等于负EINVAL
98  转到:out
100  new_flags或等于Wipe VMA contents in child.
101  退出
102  :behavior恒等于Undo MADV_WIPEONFORK
103  new_flags与等于Wipe VMA contents in child. 的反
104  退出
105  :behavior恒等于Explicity exclude from the core dump,overrides the coredump filter bits
106  new_flags或等于Do not include in the core dump
107  退出
108  :behavior恒等于Clear the MADV_DONTDUMP flag
110  error等于负EINVAL
111  转到:out
113  new_flags与等于Do not include in the core dump 的反
114  退出
115  :behavior恒等于KSM may merge identical pages
116  :behavior恒等于KSM may not merge identical pages
117  error等于ksm_madvise(vma, start, end, behavior, & new_flags)
118  如果error则转到:out_convert_errno
120  退出
121  :behavior恒等于Worth backing with hugepages
122  :behavior恒等于Not worth backing with hugepages
123  error等于hugepage_madvise(vma, & new_flags, behavior)
124  如果error则转到:out_convert_errno
126  退出
129  如果new_flags恒等于Flags, see mm.h.
130  prev等于vma
131  转到:out
134  pgoff等于Offset (within vm_file) in PAGE_SIZEunits startOur start address within vm_mm. 右移PAGE_SHIFT determines the page size 位的值
135  prev等于Given a mapping request (addr,end,vm_flags,file,pgoff), figure out* whether that can be merged with its predecessor or its successor
138  如果prev
139  vma等于prev
140  转到:success
143  prev等于vma
145  如果start不等于Our start address within vm_mm.
147  error等于负ENOMEM
148  转到:out
150  error等于__split_vma() bypasses sysctl_max_map_count checking. We use this where it* has already been checked or doesn't make sense to fail.
151  如果error则转到:out_convert_errno
155  如果end不等于The first byte after our end addresswithin vm_mm.
157  error等于负ENOMEM
158  转到:out
160  error等于__split_vma() bypasses sysctl_max_map_count checking. We use this where it* has already been checked or doesn't make sense to fail.
161  如果error则转到:out_convert_errno
165  success :
169  Flags, see mm.h. 等于new_flags
171  out_convert_errno :
176  如果error恒等于负ENOMEMerror等于负EAGAIN
178  out :
179  返回:error
调用者
名称描述
madvise_vma