函数逻辑报告 |
Source Code:mm\ksm.c |
Create Date:2022-07-27 17:14:07 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:write_protect_page
函数原型:static int write_protect_page(struct vm_area_struct *vma, struct page *page, pte_t *orig_pte)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct vm_area_struct * | vma | |
struct page * | page | |
pte_t * | orig_pte |
1044 | address等于At what user virtual address is page expected in vma?* Caller should check the page is actually part of the vma. |
1048 | BUG_ON(PageTransCompound returns true for both transparent huge pages* and hugetlbfs pages, so it should only be called when it's known* that hugetlbfs pages aren't involved.) |
1050 | mmu_notifier_range_init( & range, MMU_NOTIFY_CLEAR, 0, vma, mm, address, address + PAGE_SIZE) |
1053 | mmu_notifier_invalidate_range_start( & range) |
1057 | 如果WARN_ONCE(!pte, "Unexpected PMD mapping?")则转到:out_unlock |
1065 | swapped等于PageSwapCache(page) |
1066 | flush_cache_page(vma, address, page_to_pfn(page)) |
1081 | entry等于ptep_clear_flush(vma, address, pte) |
1086 | 如果page_mapcount(page)加1加swapped不等于page_count(page)则 |
1087 | set_pte_at(mm, address, pte, entry) |
1088 | 转到:out_unlock |
1095 | 否则entry等于pte_mkclean(pte_wrprotect(entry)) |
1100 | err等于0 |
1102 | out_unlock : |
1103 | page_vma_mapped_walk_done( & pvmw) |
1104 | out_mn : |
1105 | mmu_notifier_invalidate_range_end( & range) |
1106 | out : |
1107 | 返回:err |
名称 | 描述 |
---|---|
try_to_merge_one_page | ry_to_merge_one_page - take two pages and merge them into one*@vma: the vma that holds the pte pointing to page*@page: the PageAnon page that we want to replace with kpage*@kpage: the PageKsm page that we want to map instead of page, |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |