Function report |
Source Code:mm\ksm.c |
Create Date:2022-07-28 15:41:42 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:scan_get_next_rmap_item
Proto:static struct rmap_item *scan_get_next_rmap_item(struct page **page)
Type:struct rmap_item
Parameter:
Type | Parameter | Name |
---|---|---|
struct page ** | page |
2224 | If list_empty - tests whether a list is empty*@head: the list to test. Then Return NULL |
2228 | If slot == ksm_mm_head Then |
2239 | lru_add_drain_all() |
2247 | If Not Zeroed when merging across nodes is not allowed Then |
2255 | If page Then Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page. |
2257 | cond_resched() |
2261 | When nid < ksm_nr_node_ids cycle root_unstable_tree[nid] = |
2264 | spin_lock( & ksm_mmlist_lock) |
2267 | spin_unlock( & ksm_mmlist_lock) |
2272 | If slot == ksm_mm_head Then Return NULL |
2274 | next_mm : |
2275 | address = 0 |
2280 | lock for reading |
2287 | If Not (Flags, see mm.h. & KSM may merge identical pages ) Then Continue |
2289 | If address < Our start address within vm_mm. Then address = Our start address within vm_mm. |
2291 | If Not Serialized by page_table_lock Then address = The first byte after our end addresswithin vm_mm. |
2297 | page = follow_page(vma, address, do get_page on page ) |
2298 | If IS_ERR_OR_NULL( * page) Then |
2304 | flush_anon_page(vma, * page, address) |
2305 | flush_dcache_page( * page) |
2306 | rmap_item = get_next_rmap_item(slot, rmap_list, address) |
2308 | If rmap_item Then |
2314 | lease a read lock |
2315 | Return rmap_item |
2319 | cond_resched() |
2333 | spin_lock( & ksm_mmlist_lock) |
2336 | If address == 0 Then |
2354 | Else |
2355 | lease a read lock |
2363 | spin_unlock( & ksm_mmlist_lock) |
2368 | If slot != ksm_mm_head Then Go to next_mm |
2371 | seqnr++ |
2372 | Return NULL |
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 |