函数逻辑报告 |
Source Code:mm\ksm.c |
Create Date:2022-07-27 17:14:40 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:stable_tree_search - search for page inside the stable tree* This function checks if there is a page inside the stable tree* with identical content to the page that we are scanning right now
函数原型:static struct page *stable_tree_search(struct page *page)
返回类型:struct page
参数:
类型 | 参数 | 名称 |
---|---|---|
struct page * | page |
1560 | page_node等于page_stable_node(page) |
1568 | root等于root_stable_tree加nid |
1569 | again : |
1571 | parent = NULL |
1577 | cond_resched() |
1578 | stable_node等于rb_entry( * new, structstable_node, node) |
1579 | stable_node_any = NULL |
1580 | tree_page等于chain_prune( & stable_node_dup, & stable_node, root) |
1593 | 如果非stable_node_dup则 |
1601 | 如果非stable_node_any则 |
1603 | 转到:again |
1617 | VM_BUG_ON(!stable_node_dup ^ !!stable_node_any) |
1618 | 如果非tree_page则 |
1628 | 转到:again |
1631 | ret等于memcmp_pages(page, tree_page) |
1639 | 否则 |
1640 | 如果page_node则 |
1641 | VM_BUG_ON(when listed for migration != & Recently migrated nodes of stable tree, pending proper placement ) |
1648 | 如果page_mapcount(page)大于1则转到:chain_append |
1652 | 如果非stable_node_dup则 |
1665 | 返回:NULL |
1681 | 如果此条件成立可能性小(为编译器优化)(!tree_page)则转到:again |
1692 | 转到:replace |
1694 | 返回:tree_page |
1698 | 如果非page_node则返回:NULL |
1701 | 删除链表项 |
1703 | rb_link_node( & when node of stable tree , parent, new) |
1704 | rb_insert_color( & when node of stable tree , root) |
1705 | out : |
1706 | 如果is_page_sharing_candidate(page_node)则 |
1709 | 否则返回:NULL |
1712 | replace : |
1721 | 如果stable_node_dup恒等于stable_node则 |
1725 | 如果page_node则 |
1726 | VM_BUG_ON(when listed for migration != & Recently migrated nodes of stable tree, pending proper placement ) |
1727 | 删除链表项 |
1729 | rb_replace_node( & when node of stable tree , & when node of stable tree , root) |
1732 | 如果is_page_sharing_candidate(page_node)则get_page(page) |
1734 | 否则page = NULL |
1736 | 否则 |
1737 | rb_erase( & when node of stable tree , root) |
1738 | page = NULL |
1740 | 否则 |
1741 | VM_BUG_ON(!is_stable_node_chain(stable_node)) |
1743 | 如果page_node则 |
1744 | VM_BUG_ON(when listed for migration != & Recently migrated nodes of stable tree, pending proper placement ) |
1745 | 删除链表项 |
1748 | 如果is_page_sharing_candidate(page_node)则get_page(page) |
1750 | 否则page = NULL |
1752 | 否则 |
1753 | page = NULL |
1757 | 添加链表项 |
1758 | 返回:page |
1760 | chain_append : |
1772 | 如果stable_node_dup恒等于stable_node则 |
1778 | 如果非stable_node则返回:NULL |
1787 | VM_BUG_ON(!is_stable_node_chain(stable_node)) |
1789 | VM_BUG_ON(when listed for migration != & Recently migrated nodes of stable tree, pending proper placement ) |
1790 | 删除链表项 |
1793 | 转到:out |
名称 | 描述 |
---|---|
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 插件可实现:逻辑报告 代码生成和批量转换代码 |