函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:khugepaged_do_scan

函数原型:static void khugepaged_do_scan(void)

返回类型:void

参数:

2062  struct page * hpage = NULL
2063  progress等于0, pass_through_head等于0
2064  pages等于default scan 8*512 pte (or vmas) every 30 second
2065  bool wait = true
2067  The "volatile" is due to gcc bugs ()
2069 progress小于pages循环
2070  如果非khugepaged_prealloc_page( & hpage, & wait)则退出
2073  cond_resched()
2075  如果此条件成立可能性小(为编译器优化)(kthread_should_stop - should this kthread return now?* When someone calls kthread_stop() on your kthread, it will be woken* and this will return true. You should then return, and your return* value will be passed through to kthread_stop(). || try_to_freeze())则退出
2078  加自旋锁
2079  如果非mm_slotpass_through_head自加
2081  如果khugepaged_has_work()且pass_through_head小于2则progress加等于khugepaged_scan_mm_slot(pages - progress, & hpage)
2085  否则progress等于pages
2087  自旋锁解锁
2090  如果非是错误或空Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
调用者
名称描述
khugepaged