Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:start_stop_khugepaged

Proto:int start_stop_khugepaged(void)

Type:int

Parameter:Nothing

2187  khugepaged_thread((__section__(".data..read_mostly")))
2188  DEFINE_MUTEX(khugepaged_mutex)
2189  err = 0
2191  mutex_lock( & khugepaged_mutex)
2192  If khugepaged_enabled() Then
2193  If Not khugepaged_thread Then khugepaged_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  If IS_ERR(khugepaged_thread) Then
2197  pr_err("khugepaged: kthread_run(khugepaged) failed\n")
2199  khugepaged_thread = NULL
2200  Go to fail
2203  If Not list_empty - tests whether a list is empty*@head: the list to test. Then wake_up_interruptible( & khugepaged_wait)
2206  set_recommended_min_free_kbytes()
2207  Else if khugepaged_thread Then
2208  stop a thread
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  Return err