Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:khugepaged_do_scan

Proto:static void khugepaged_do_scan(void)

Type:void

Parameter:Nothing

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  When progress < pages cycle
2070  If Not khugepaged_prealloc_page( & hpage, & wait) Then Break
2073  cond_resched()
2075  If Value for the false possibility is greater at compile time(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()) Then Break
2078  spin_lock( & khugepaged_mm_lock)
2079  If Not mm_slot Then pass_through_head++
2081  If khugepaged_has_work() && pass_through_head < 2 Then progress += khugepaged_scan_mm_slot(pages - progress, & hpage)
2085  Else progress = pages
2087  spin_unlock( & khugepaged_mm_lock)
2090  If Not IS_ERR_OR_NULL(hpage) Then Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
Caller
NameDescribe
khugepaged