函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmscan.c Create Date:2022-07-27 15:44:02
Last Modify:2022-05-23 13:41:30 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static int kswapd(void *p)

返回类型:int

参数:

类型参数名称
void *p
3889  classzone_idx等于MAX_NR_ZONES减1
3890  pgdat等于p
3891  tsk等于当前进程
3892  cpumask等于Returns a pointer to the cpumask of CPUs on Node 'node'.
3894  如果非pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear.set_cpus_allowed_ptr(tsk, cpumask)
3909  flags或等于Allocating memory 按位或Allowed to write to swap 按位或I am kswapd
3910  set_freezable()
3912  kswapd_order等于0
3913  kswapd_classzone_idx等于MAX_NR_ZONES
3914  循环
3917  alloc_order等于reclaim_order等于kswapd_order
3918  classzone_idx等于kswapd_classzone_idx(pgdat, classzone_idx)
3920  kswapd_try_sleep :
3921  kswapd_try_to_sleep(pgdat, alloc_order, reclaim_order, classzone_idx)
3925  alloc_order等于reclaim_order等于kswapd_order
3926  classzone_idx等于kswapd_classzone_idx(pgdat, classzone_idx)
3927  kswapd_order等于0
3928  kswapd_classzone_idx等于MAX_NR_ZONES
3930  ret等于try_to_freeze()
3931  如果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().退出
3938  如果ret则继续下一循环
3949  trace_mm_vmscan_kswapd_wake(全局结点ID, classzone_idx, alloc_order)
3951  reclaim_order等于For kswapd, balance_pgdat() will reclaim pages across a node from zones* that are eligible for use by the caller until at least one zone is* balanced.* Returns the order kswapd finished reclaiming at.
3952  如果reclaim_order小于alloc_order则转到:kswapd_try_sleep
3956  flags与等于Allocating memory 按位或Allowed to write to swap 按位或I am kswapd 的值的反
3958  返回:0