Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:calc_load_fold_active

Proto:long calc_load_fold_active(struct rq *this_rq, long adjust)

Type:long

Parameter:

TypeParameterName
struct rq *this_rq
longadjust
81  delta = 0
83  nr_active = * nr_running and cpu_load should be in the same cacheline because * remote CPUs use both these fields when doing load calculation. - adjust
84  nr_active += * This is part of a global counter where only the total sum * over all CPUs matters. A task can increase this counter on * one CPU and if it got migrated afterwards it may decrease * it on another CPU. Always updated under the runqueue lock:
86  If nr_active != calc_load_active Then
87  delta = nr_active - calc_load_active
88  calc_load_active = nr_active
91  Return delta
Caller
NameDescribe
calc_global_load_tickCalled from scheduler_tick() to periodically update this CPU's* active count.