Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmscan.c Create Date:2022-07-28 14:20:10
Last Modify:2022-05-23 13:41:30 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:This kswapd start function will be called by init and node-hot-add.* On node-hot-add, kswapd will moved to proper cpus if cpus are hot-added.

Proto:int kswapd_run(int nid)

Type:int

Parameter:

TypeParameterName
intnid
4076  pgdat = NODE_DATA(nid)
4077  ret = 0
4079  If Protected by mem_hotplug_begin/end() Then Return 0
4082  Protected by mem_hotplug_begin/end() = 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(The background pageout daemon, started as a kernel thread* from the init process.* This basically trickles out pages so that we have _some_* free memory available even if there is no other activity* that frees anything up, pgdat, "kswapd%d", nid)
4083  If IS_ERR( Protected by mem_hotplug_begin/end() ) Then
4085  BUG_ON(system_state < SYSTEM_RUNNING)
4086  pr_err("Failed to start kswapd on node %d\n", nid)
4087  ret = PTR_ERR( Protected by mem_hotplug_begin/end() )
4088  Protected by mem_hotplug_begin/end() = NULL
4090  Return ret
Caller
NameDescribe
kswapd_init