Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\math64.h Create Date:2022-07-28 05:34:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mul_u64_u32_shr

Proto:static inline u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift)

Type:u64

Parameter:

TypeParameterName
u64a
u32mul
unsigned intshift
198  al = a
199  ah = a >> 32
201  ret = mul_u32_u32(al, mul) >> shift
202  If ah Then ret += mul_u32_u32(ah, mul) << 32 - shift
205  Return ret
Caller
NameDescribe
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.