Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:This function computes an effective utilization for the given CPU, to be* used for frequency selection given the linear relation: f = u * f_max

Proto:unsigned long schedutil_cpu_util(int cpu, unsigned long util_cfs, unsigned long max, enum schedutil_type type, struct task_struct *p)

Type:unsigned long

Parameter:

TypeParameterName
intcpu
unsigned longutil_cfs
unsigned longmax
enum schedutil_typetype
struct task_struct *p
211  rq = cpu_rq(cpu)
213  If Not IS_BUILTIN(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', 0* otherwise. For boolean options, this is equivalent to* IS_ENABLED(CONFIG_FOO).(CONFIG_UCLAMP_TASK) && type == FREQUENCY_UTIL && rt_rq_is_runnable( & rt) Then
215  Return max
223  irq = cpu_util_irq(rq)
224  If Value for the false possibility is greater at compile time(irq >= max) Then Return max
239  util = util_cfs + cpu_util_rt(rq)
240  If type == FREQUENCY_UTIL Then util = uclamp_util_with(rq, util, p)
243  dl_util = cpu_util_dl(rq)
254  If util + dl_util >= max Then Return max
261  If type == ENERGY_UTIL Then util += dl_util
273  util = scale_irq_capacity(util, irq, max)
274  util += irq
286  If type == FREQUENCY_UTIL Then util += cpu_bw_dl(rq)
289  Return min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(max, util)
Caller
NameDescribe
sugov_get_util