函数逻辑报告 |
Source Code:mm\ksm.c |
Create Date:2022-07-27 17:14:46 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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.
函数原型:static struct stable_node *stable_tree_insert(struct page *kpage)
返回类型:struct stable_node
参数:
类型 | 参数 | 名称 |
---|---|---|
struct page * | kpage |
1811 | bool need_chain = false |
1813 | kpfn等于page_to_pfn(kpage) |
1815 | root等于root_stable_tree加nid |
1816 | again : |
1817 | parent = NULL |
1824 | cond_resched() |
1825 | stable_node等于rb_entry( * new, structstable_node, node) |
1826 | stable_node_any = NULL |
1827 | tree_page等于chain( & stable_node_dup, stable_node, root) |
1828 | 如果非stable_node_dup则 |
1836 | 如果非stable_node_any则 |
1838 | 转到:again |
1852 | VM_BUG_ON(!stable_node_dup ^ !!stable_node_any) |
1853 | 如果非tree_page则 |
1863 | 转到:again |
1866 | ret等于memcmp_pages(kpage, tree_page) |
1874 | 否则 |
1875 | need_chain = true |
1876 | 退出 |
1880 | stable_node_dup等于alloc_stable_node() |
1881 | 如果非stable_node_dup则返回:NULL |
1884 | INIT_HLIST_HEAD( & hlist) |
1887 | rmap_hlist_len等于0 |
1889 | 如果非need_chain则 |
1890 | rb_link_node( & when node of stable tree , parent, new) |
1891 | rb_insert_color( & when node of stable tree , root) |
1892 | 否则 |
1893 | 如果非is_stable_node_chain(stable_node)则 |
1894 | orig等于stable_node |
1896 | stable_node等于alloc_stable_node_chain(orig, root) |
1897 | 如果非stable_node则 |
1899 | 返回:NULL |
1905 | 返回:stable_node_dup |
名称 | 描述 |
---|---|
cmp_and_merge_page | 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 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |