函数逻辑报告 |
Source Code:mm\ksm.c |
Create Date:2022-07-27 17:15:01 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:mp_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
函数原型:static void cmp_and_merge_page(struct page *page, struct rmap_item *rmap_item)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct page * | page | |
struct rmap_item * | rmap_item |
2044 | bool max_page_sharing_bypass = false |
2046 | stable_node等于page_stable_node(page) |
2047 | 如果stable_node则 |
2053 | 添加链表项 |
2055 | 如果when listed for migration 不等于Recently migrated nodes of stable tree, pending proper placement 且 when listed from stable tree 恒等于stable_node则返回 |
2062 | 如果非is_page_sharing_candidate(stable_node)则max_page_sharing_bypass = true |
2068 | 如果kpage恒等于page且 when listed from stable tree 恒等于stable_node则 |
2070 | 返回 |
2075 | 如果kpage则 |
2080 | 如果非err则 |
2091 | 返回 |
2100 | checksum等于calc_checksum(page) |
2101 | 如果 when unstable 不等于checksum则 |
2102 | when unstable 等于checksum |
2103 | 返回 |
2113 | lock for reading |
2117 | lease a read lock |
2122 | 如果非err则返回 |
2127 | 如果tree_rmap_item则 |
2130 | kpage等于ry_to_merge_two_pages - take two identical pages and prepare them* to be merged into one page |
2145 | 如果kpage则 |
2151 | stable_node等于stable_tree_insert - insert stable tree node pointing to new ksm page* into the stable tree.* This function returns the stable tree node just allocated on success,* NULL otherwise. |
2152 | 如果stable_node则 |
2166 | 如果非stable_node则 |
2167 | break_cow(tree_rmap_item) |
2170 | 否则如果split则 |
2182 | split_huge_page(page) |
名称 | 描述 |
---|---|
ksm_do_scan | ksm_do_scan - the ksm scanner main worker function.*@scan_npages: number of pages we want to scan before we return. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |