函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\fair.c Create Date:2022-07-27 10:38:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:delta_exec * weight / lw.weight* OR* (delta_exec * (weight * lw->inv_weight)) >> WMULT_SHIFT* Either weight := NICE_0_LOAD and lw \e sched_prio_to_wmult[], in which case* we're guaranteed shift stays positive because inv_weight is guaranteed to

函数原型:static u64 __calc_delta(u64 delta_exec, unsigned long weight, struct load_weight *lw)

返回类型:u64

参数:

类型参数名称
u64delta_exec
unsigned longweight
struct load_weight *lw
220  fact等于scale_load_down(weight)
221  shift等于WMULT_SHIFT
223  __update_inv_weight(lw)
225  如果此条件成立可能性小(为编译器优化)(fact >> 32)则
226 fact右移32位循环
227  fact右移等于1位
228  shift自减
232  fact等于mul_u32_u32(fact, inv_weight)
234 fact右移32位循环
235  fact右移等于1位
236  shift自减
239  返回:mul_u64_u32_shr(delta_exec, fact, shift)
调用者
名称描述
calc_delta_fairdelta /= w
sched_slice分配给进程的运行时间