Function report |
Source Code:mm\ksm.c |
Create Date:2022-07-28 15:40:26 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:get_ksm_page: checks if the page indicated by the stable node* is still its ksm page, despite having held no reference to it.* In which case we can trust the content of the page, and it* returns the gotten page; but if the page has now been zapped,
Proto:static struct page *get_ksm_page(struct stable_node *stable_node, enum get_ksm_page_flags flags)
Type:struct page
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct stable_node * | stable_node | |
| enum get_ksm_page_flags | flags |
| 703 | again : |
| 705 | page = pfn_to_page(kpfn) |
| 706 | If READ_ONCE( See page-flags.h for PAGE_MAPPING_FLAGS ) != expected_mapping Then Go to stale |
| 728 | If Not PageSwapCache(page) Then Go to stale |
| 730 | cpu_relax() |
| 733 | If READ_ONCE( See page-flags.h for PAGE_MAPPING_FLAGS ) != expected_mapping Then |
| 735 | Go to stale |
| 738 | If flags == GET_KSM_PAGE_TRYLOCK Then |
| 739 | If Not Return true if the page was successfully locked Then |
| 743 | Else if flags == GET_KSM_PAGE_LOCK Then lock_page may only be called if we have the page's inode pinned. |
| 746 | If flags != GET_KSM_PAGE_NOLOCK Then |
| 747 | If READ_ONCE( See page-flags.h for PAGE_MAPPING_FLAGS ) != expected_mapping Then |
| 750 | Go to stale |
| 753 | Return page |
| 755 | stale : |
| 762 | smp_rmb() |
| 766 | Return NULL |
| Name | Describe |
|---|---|
| remove_rmap_item_from_tree | Removing rmap_item from stable or unstable tree.* This function will clean the information from the stable/unstable tree. |
| stable_node_dup | |
| __stable_node_chain | Like for get_ksm_page, this function can free the *_stable_node and* *_stable_node_dup if the returned tree_page is NULL |
| stable_tree_search | 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 |
| stable_tree_insert | 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. |
| scan_get_next_rmap_item |
| 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 |