函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\math64.h Create Date:2022-07-27 06:38:29
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:mul_u64_u32_shr

函数原型:static inline u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift)

返回类型:u64

参数:

类型参数名称
u64a
u32mul
unsigned intshift
198  al等于a
199  ah等于a右移32位
201  ret等于mul_u32_u32(al, mul)右移shift
202  如果ahret加等于mul_u32_u32(ah, mul)左移32减shift
205  返回:ret
调用者
名称描述
cycles_2_nsAccelerators for sched_clock()* convert from cycles(64bits) => nanoseconds (64bits)* basic equation:* ns = cycles / (freq / ns_per_sec)* ns = cycles * (ns_per_sec / freq)* ns = cycles * (10^9 / (cpu_khz * 10^3))* ns = cycles * (10^6 / cpu_khz)
__set_cyc2ns_scale
__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
decay_loadApproximate:* val * y^n, where y^32 ~= 0.5 (~1 scheduling period)
clocksource_stop_suspend_timinglocksource_stop_suspend_timing - Stop measuring the suspend timing*@cs: current clocksource from timekeeping*@cycle_now: current cycles from timekeeping* This function will calculate the suspend time from suspend timer.