Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\ksm.c Create Date:2022-07-28 15:40:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static int unmerge_ksm_pages(struct vm_area_struct *vma, unsigned long start, unsigned long end)

Type:int

Parameter:

TypeParameterName
struct vm_area_struct *vma
unsigned longstart
unsigned longend
847  err = 0
849  When addr < end && Not err cycle
850  If ksmd, and unmerge_and_remove_all_rmap_items(), must not touch an mm's* page tables after it has passed through ksm_exit() - which, if necessary,* takes mmap_sem briefly to serialize against them. ksm_exit() does not set Then Break
852  If signal_pending(current process) Then err = -These should never be seen by user programs. To return one of ERESTART** codes, signal_pending() MUST be set. Note that ptrace can observe these* at syscall exit tracing, but they will never be left for the debugged user* process to see.
854  Else err = 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,
857  Return err
Caller
NameDescribe
ksm_madvise