Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static u64 __calc_delta(u64 delta_exec, unsigned long weight, struct load_weight *lw)

Type:u64

Parameter:

TypeParameterName
u64delta_exec
unsigned longweight
struct load_weight *lw
220  fact = scale_load_down(weight)
221  shift = WMULT_SHIFT
223  __update_inv_weight(lw)
225  If Value for the false possibility is greater at compile time(fact >> 32) Then
226  When fact >> 32 cycle
227  fact >>= 1
228  shift--
232  fact = mul_u32_u32(fact, inv_weight)
234  When fact >> 32 cycle
235  fact >>= 1
236  shift--
239  Return mul_u64_u32_shr(delta_exec, fact, shift)
Caller
NameDescribe
calc_delta_fairdelta /= w
sched_sliceWe calculate the wall-time slice from the period by taking a part* proportional to the weight.* s = p*P[w/rw]