函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:find_mergeable_vma

函数原型:static struct vm_area_struct *find_mergeable_vma(struct mm_struct *mm, unsigned long addr)

返回类型:struct vm_area_struct

参数:

类型参数名称
struct mm_struct *mm
unsigned longaddr
523  如果ksmd, and unmerge_and_remove_all_rmap_items(), must not touch an mm's* page tables after it has passed through ksm_exit() - which, if necessary,* takes mmap_sem briefly to serialize against them. ksm_exit() does not set则返回:NULL
525  vma等于Look up the first VMA which satisfies addr < vm_end, NULL if none.
526  如果非vmaOur start address within vm_mm. 大于addr则返回:NULL
528  如果非Flags, see mm.h. 按位与KSM may merge identical pages 的值或非Serialized by page_table_lock 则返回:NULL
530  返回:vma
调用者
名称描述
break_cow
get_mergeable_page
try_to_merge_with_ksm_pagery_to_merge_with_ksm_page - like try_to_merge_two_pages,* but no new kernel page is allocated: kpage must already be a ksm page.* This function returns 0 if the pages were merged, -EFAULT otherwise.
cmp_and_merge_pagemp_and_merge_page - first see if page can be merged into the stable tree;* if not, compare checksum to previous and if it's the same, see if page can* be inserted into the unstable tree, or merged with a page already there and