函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\resctrl\pseudo_lock.c Create Date:2022-07-27 09:14:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:measure_cycles_lat_fn - Measure cycle latency to read pseudo-locked memory*@_plr: pseudo-lock region to measure* There is no deterministic way to test if a memory region is cached. One* way is to measure how long it takes to read the memory, the speed of

函数原型:static int measure_cycles_lat_fn(void *_plr)

返回类型:int

参数:

类型参数名称
void *_plr
869  plr等于_plr
874  禁止中断()
878  wrmsr(MSR_MISC_FEATURE_CONTROL, The bits needed to disable hardware prefetching varies based on the* platform. During initialization we will discover which bits to use., 0x0)
879  mem_r等于READ_ONCE(kmem)
884  start等于dtsc_ordered() - read the current TSC in program order* rdtsc_ordered() returns the result of RDTSC as a 64-bit integer.* It is ordered like a load to a global in-memory counter. It should* be impossible to observe non-monotonic rdtsc_unordered() behavior
885 i小于size循环
886  start等于dtsc_ordered() - read the current TSC in program order* rdtsc_ordered() returns the result of RDTSC as a 64-bit integer.* It is ordered like a load to a global in-memory counter. It should* be impossible to observe non-monotonic rdtsc_unordered() behavior
887  asm volatile
891  end等于dtsc_ordered() - read the current TSC in program order* rdtsc_ordered() returns the result of RDTSC as a 64-bit integer.* It is ordered like a load to a global in-memory counter. It should* be impossible to observe non-monotonic rdtsc_unordered() behavior
892  trace_pseudo_lock_mem_latency((u32)(end - start))
894  wrmsr(MSR_MISC_FEATURE_CONTROL, 0x0, 0x0)
895  开中断()
896  thread_done等于1
897  wake_up_interruptible( & lock_thread_wq)
898  返回:0