函数逻辑报告

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:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:pseudo_lock_measure_cycles - Trigger latency measure to pseudo-locked region* The measurement of latency to access a pseudo-locked region should be* done from a cpu that is associated with that pseudo-locked region

函数原型:static int pseudo_lock_measure_cycles(struct rdtgroup *rdtgrp, int sel)

返回类型:int

参数:

类型参数名称
struct rdtgroup *rdtgrp
intsel
1153  plr等于plr
1156  ret等于负1
1158  cpus_read_lock()
1159  mutex_lock( & Mutex to protect rdtgroup access. )
1161  如果flags按位与dtgroup.flags
1162  ret等于负ENODEV
1163  转到:out
1166  如果非d
1167  ret等于负ENODEV
1168  转到:out
1171  thread_done等于0
1172  cpu等于Uniprocessor. Assume all masks are "1".
1173  如果非cpu_online(cpu)则
1174  ret等于负ENODEV
1175  转到:out
1178  cpu等于cpu
1180  如果sel恒等于1则thread等于kthread_create_on_node(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, plr, cpu_to_node(cpu), "pseudo_lock_measure/%u", cpu)
1185  否则如果sel恒等于2则thread等于kthread_create_on_node(measure_l2_residency, plr, cpu_to_node(cpu), "pseudo_lock_measure/%u", cpu)
1190  否则如果sel恒等于3则thread等于kthread_create_on_node(measure_l3_residency, plr, cpu_to_node(cpu), "pseudo_lock_measure/%u", cpu)
1195  否则转到:out
1198  如果是错误
1199  ret等于错误
1200  转到:out
1202  kthread_bind(thread, cpu)
1203  唤醒中断线程
1205  ret等于wait_event_interruptible - sleep until a condition gets true*@wq_head: the waitqueue to wait on*@condition: a C expression for the event to wait for* The process is put to sleep (TASK_INTERRUPTIBLE) until the(lock_thread_wq, thread_done == 1)
1207  如果ret小于0则转到:out
1210  ret等于0
1212  out :
1213  mutex_unlock( & Mutex to protect rdtgroup access. )
1214  cpus_read_unlock()
1215  返回:ret
调用者
名称描述
pseudo_lock_measure_trigger