函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:start_stop_khugepaged

函数原型:int start_stop_khugepaged(void)

返回类型:int

参数:

2187  khugepaged_thread((__section__(".data..read_mostly")))
2188  DEFINE_MUTEX(khugepaged_mutex)
2189  err等于0
2191  mutex_lock( & khugepaged_mutex)
2192  如果khugepaged_enabled()则
2193  如果非khugepaged_threadkhugepaged_thread等于kthread_run - create and wake a thread.*@threadfn: the function to run until signal_pending(current).*@data: data ptr for @threadfn.*@namefmt: printf-style name for the thread.* Description: Convenient wrapper for kthread_create() followed by(khugepaged, NULL, "khugepaged")
2196  如果是错误
2197  打印错误信息("khugepaged: kthread_run(khugepaged) failed\n")
2198  err等于错误
2199  khugepaged_thread = NULL
2200  转到:fail
2203  如果非链表为空wake_up_interruptible( & khugepaged_wait)
2206  set_recommended_min_free_kbytes()
2207  否则如果khugepaged_thread
2208  结束线程的运行
2209  khugepaged_thread = NULL
2211  fail :
2212  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.
2213  返回:err