函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\ksm.c Create Date:2022-07-27 17:15:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ksm_do_scan - the ksm scanner main worker function.*@scan_npages: number of pages we want to scan before we return.

函数原型:static void ksm_do_scan(unsigned int scan_npages)

返回类型:void

参数:

类型参数名称
unsigned intscan_npages
2382  struct page * page = page
2384 scan_npages自减且此条件成立可能性大(为编译器优化)(!freezing(当前进程))循环
2385  cond_resched()
2386  rmap_item等于scan_get_next_rmap_item( & page)
2387  如果非rmap_item则返回
2389  mp_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
2390  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
调用者
名称描述
ksm_scan_thread