Function report |
Source Code:mm\ksm.c |
Create Date:2022-07-28 15:41:10 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:static struct page *stable_tree_search(struct page *page)
Type:struct page
Parameter:
Type | Parameter | Name |
---|---|---|
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 | If Not stable_node_dup Then |
1601 | If Not stable_node_any Then |
1603 | Go to again |
1617 | VM_BUG_ON(!stable_node_dup ^ !!stable_node_any) |
1618 | If Not tree_page Then |
1628 | Go to again |
1631 | ret = memcmp_pages(page, tree_page) |
1639 | Else |
1640 | If page_node Then |
1641 | VM_BUG_ON(when listed for migration != & Recently migrated nodes of stable tree, pending proper placement ) |
1648 | If page_mapcount(page) > 1 Then Go to chain_append |
1652 | If Not stable_node_dup Then |
1665 | Return NULL |
1681 | If Value for the false possibility is greater at compile time(!tree_page) Then Go to again |
1692 | Go to replace |
1694 | Return tree_page |
1698 | If Not page_node Then Return NULL |
1703 | rb_link_node( & when node of stable tree , parent, new) |
1704 | rb_insert_color( & when node of stable tree , root) |
1705 | out : |
1706 | If is_page_sharing_candidate(page_node) Then |
1709 | Else Return NULL |
1712 | replace : |
1721 | If stable_node_dup == stable_node Then |
1725 | If page_node Then |
1726 | VM_BUG_ON(when listed for migration != & Recently migrated nodes of stable tree, pending proper placement ) |
1729 | rb_replace_node( & when node of stable tree , & when node of stable tree , root) |
1732 | If is_page_sharing_candidate(page_node) Then get_page(page) |
1734 | Else page = NULL |
1736 | Else |
1737 | rb_erase( & when node of stable tree , root) |
1738 | page = NULL |
1740 | Else |
1741 | VM_BUG_ON(!is_stable_node_chain(stable_node)) |
1743 | If page_node Then |
1744 | VM_BUG_ON(when listed for migration != & Recently migrated nodes of stable tree, pending proper placement ) |
1748 | If is_page_sharing_candidate(page_node) Then get_page(page) |
1750 | Else page = NULL |
1752 | Else |
1753 | page = NULL |
1758 | Return page |
1760 | chain_append : |
1762 | If Not stable_node_dup Then stable_node_dup = stable_node_any |
1772 | If stable_node_dup == stable_node Then |
1778 | If Not stable_node Then Return 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 ) |
1793 | Go to out |
Name | Describe |
---|---|
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 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |