Function report |
Source Code:mm\ksm.c |
Create Date:2022-07-28 15:40:13 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:We use break_ksm to break COW on a ksm page: it's a stripped down* if (get_user_pages(addr, 1, 1, 1, &page, NULL) == 1)* put_page(page);* but taking great care only to touch a ksm page, in a VM_MERGEABLE vma,
Proto:static int break_ksm(struct vm_area_struct *vma, unsigned long addr)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct vm_area_struct * | vma | |
unsigned long | addr |
473 | ret = 0 |
475 | Do |
476 | cond_resched() |
477 | page = follow_page(vma, addr, do get_page on page | wait for page to replace migration entry | we are working on non-current tsk/mm ) |
479 | If IS_ERR_OR_NULL(page) Then Break |
484 | Else ret = VM_FAULT_WRITE |
487 | When Not (ret & ( VM_FAULT_WRITE | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | VM_FAULT_OOM)) cycle |
516 | Return If ret & VM_FAULT_OOM Then -ENOMEM Else 0 |
Name | Describe |
---|---|
break_cow | |
unmerge_ksm_pages | Though it's very tempting to unmerge rmap_items from stable tree rather* than check every pte of a given vma, the locking doesn't quite work for* that - an rmap_item is assigned to the stable tree after inserting ksm* page and upping mmap_sem |
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 |