函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__update_inv_weight

函数原型:static void __update_inv_weight(struct load_weight *lw)

返回类型:void

参数:

类型参数名称
struct load_weight *lw
193  如果此条件成立可能性大(为编译器优化)(inv_weight)则返回
196  w等于scale_load_down(weight)
198  如果BITS_PER_LONG大于32且此条件成立可能性小(为编译器优化)(w >= WMULT_CONST)则inv_weight等于1
200  否则如果此条件成立可能性小(为编译器优化)(!w)则inv_weight等于WMULT_CONST
202  否则inv_weight等于WMULT_CONSTw
调用者
名称描述
__calc_deltadelta_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