Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ksm_scan_thread

Proto:static int ksm_scan_thread(void *nothing)

Type:int

Parameter:

TypeParameterName
void *nothing
2403  set_freezable - make %current freezable* Mark %current freezable and enter refrigerator if necessary.
2404  set_user_nice(current process, 5)
2406  When Not 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(). cycle
2407  mutex_lock( & ksm_thread_mutex)
2408  wait_while_offlining()
2409  If ksmd_should_run() Then ksm_do_scan - the ksm scanner main worker function.*@scan_npages: number of pages we want to scan before we return.
2411  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
2413  try_to_freeze()
2415  If ksmd_should_run() Then
2420  Else
2425  Return 0