Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Scheduler clock - returns current time in nanosec units.

Proto:u64 native_sched_clock(void)

Type:u64

Parameter:Nothing

212  If static_branch_likely( & __use_tsc) Then
213  tsc_now = dtsc() - returns the current TSC without ordering constraints* rdtsc() returns the result of RDTSC as a 64-bit integer
216  Return Accelerators 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)
229  Return (The 64-bit value is not atomic - you MUST NOT read it* without sampling the sequence number in jiffies_lock.* get_jiffies_64() will do this for you as appropriate. - Have the 32 bit jiffies value wrap 5 minutes after boot* so jiffies wrap bugs show up earlier.) * 1000000000 / HZ