Lines Matching +full:cpu +full:- +full:ns
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
21 * PV specific per-cpu counter
30 * Average kick latency (ns) = pv_latency_kick/pv_kick_unlock
32 * Average wake latency (ns) = pv_latency_wake/pv_kick_wake
40 int cpu, id, len; in lockevent_read() local
44 * Get the counter ID stored in file->f_inode->i_private in lockevent_read()
46 id = (long)file_inode(file)->i_private; in lockevent_read()
49 return -EBADF; in lockevent_read()
51 for_each_possible_cpu(cpu) { in lockevent_read()
52 sum += per_cpu(lockevents[id], cpu); in lockevent_read()
60 kicks += per_cpu(EVENT_COUNT(pv_kick_unlock), cpu); in lockevent_read()
64 kicks += per_cpu(EVENT_COUNT(pv_kick_wake), cpu); in lockevent_read()
80 len = snprintf(buf, sizeof(buf) - 1, "%llu.%02llu\n", in lockevent_read()
84 * Round to the nearest ns in lockevent_read()
91 len = snprintf(buf, sizeof(buf) - 1, "%llu\n", sum); in lockevent_read()
108 static inline void __pv_kick(int cpu) in __pv_kick() argument
112 per_cpu(pv_kick_time, cpu) = start; in __pv_kick()
113 pv_kick(cpu); in __pv_kick()
114 this_cpu_add(EVENT_COUNT(pv_latency_kick), sched_clock() - start); in __pv_kick()
128 sched_clock() - *pkick_time); in __pv_wait()