Function report |
Source Code:mm\ksm.c |
Create Date:2022-07-28 15:41:31 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:static void cmp_and_merge_page(struct page *page, struct rmap_item *rmap_item)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct page * | page | |
struct rmap_item * | rmap_item |
2044 | bool max_page_sharing_bypass = false |
2046 | stable_node = page_stable_node(page) |
2047 | If stable_node Then |
2055 | If when listed for migration != Recently migrated nodes of stable tree, pending proper placement && when listed from stable tree == stable_node Then Return |
2062 | If Not is_page_sharing_candidate(stable_node) Then max_page_sharing_bypass = true |
2068 | If kpage == page && when listed from stable tree == stable_node Then |
2070 | Return |
2075 | If kpage Then |
2080 | If Not err Then |
2091 | Return |
2100 | checksum = calc_checksum(page) |
2101 | If when unstable != checksum Then |
2102 | when unstable = checksum |
2103 | Return |
2113 | lock for reading |
2117 | lease a read lock |
2122 | If Not err Then Return |
2127 | If tree_rmap_item Then |
2130 | kpage = ry_to_merge_two_pages - take two identical pages and prepare them* to be merged into one page |
2145 | If kpage Then |
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 | If stable_node Then |
2166 | If Not stable_node Then |
2167 | break_cow(tree_rmap_item) |
2170 | Else if split Then |
2180 | If Not Return true if the page was successfully locked Then Return |
2182 | split_huge_page(page) |
Name | Describe |
---|---|
ksm_do_scan | ksm_do_scan - the ksm scanner main worker function.*@scan_npages: number of pages we want to scan before we return. |
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 |