函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ksm_scan_thread

函数原型:static int ksm_scan_thread(void *nothing)

返回类型:int

参数:

类型参数名称
void *nothing
2403  set_freezable - make %current freezable* Mark %current freezable and enter refrigerator if necessary.
2404  set_user_nice(当前进程, 5)
2406  当非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().循环
2407  mutex_lock( & ksm_thread_mutex)
2408  wait_while_offlining()
2409  如果ksmd_should_run()则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  如果ksmd_should_run()则
2420  否则
2425  返回:0