Function report |
Source Code:mm\ksm.c |
Create Date:2022-07-28 15:41:56 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ksm_might_need_to_copy
Proto:struct page *ksm_might_need_to_copy(struct page *page, struct vm_area_struct *vma, unsigned long address)
Type:struct page
Parameter:
Type | Parameter | Name |
---|---|---|
struct page * | page | |
struct vm_area_struct * | vma | |
unsigned long | address |
2563 | anon_vma = page_anon_vma(page) |
2567 | If page_stable_node(page) && Not (ksm_run & KSM_RUN_UNMERGE) Then Return page |
2570 | Else if Not anon_vma Then |
2571 | Return page |
2572 | Else if Root of this anon_vma tree == root && Our offset within mapping. == linear_page_index(vma, address) Then |
2574 | Return page |
2576 | If Not PageUptodate(page) Then Return page |
2579 | new_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, address) |
2580 | If new_page Then |
2581 | copy_user_highpage(new_page, page, address, vma) |
2583 | SetPageDirty(new_page) |
2584 | __SetPageUptodate(new_page) |
2585 | __SetPageLocked(new_page) |
2588 | Return new_page |
Name | Describe |
---|---|
unuse_pte | No need to decide whether this PTE shares the swap entry with others,* just let do_wp_page work it out if a write is requested later - to* force COW, vm_page_prot omits write permission from any private vma. |
do_swap_page | We enter with non-exclusive mmap_sem (to exclude vma changes,* but allow concurrent faults), and pte mapped but not yet locked.* We return with pte unmapped and unlocked.* We return with the mmap_sem locked or unlocked in the same cases |
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 |