Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ry_to_merge_with_ksm_page - like try_to_merge_two_pages,* but no new kernel page is allocated: kpage must already be a ksm page.* This function returns 0 if the pages were merged, -EFAULT otherwise.

Proto:static int try_to_merge_with_ksm_page(struct rmap_item *rmap_item, struct page *page, struct page *kpage)

Type:int

Parameter:

TypeParameterName
struct rmap_item *rmap_item
struct page *page
struct page *kpage
1279  mm = mm
1281  err = -EFAULT
1283  lock for reading
1284  vma = find_mergeable_vma(mm, + low bits used for flags below )
1285  If Not vma Then Go to out
1288  err = ry_to_merge_one_page - take two pages and merge them into one*@vma: the vma that holds the pte pointing to page*@page: the PageAnon page that we want to replace with kpage*@kpage: the PageKsm page that we want to map instead of page,
1289  If err Then Go to out
1293  Removing rmap_item from stable or unstable tree.* This function will clean the information from the stable/unstable tree.
1296  when stable = Serialized by page_table_lock
1297  get_anon_vma(Serialized by page_table_lock )
1298  out :
1299  lease a read lock
1300  Return err
Caller
NameDescribe
try_to_merge_two_pagesry_to_merge_two_pages - take two identical pages and prepare them* to be merged into one page
cmp_and_merge_pagemp_and_merge_page - first see if page can be merged into the stable tree;* if not, compare checksum to previous and if it's the same, see if page can* be inserted into the unstable tree, or merged with a page already there and