4/4/2023 0 Comments Timekeeper clone![]() Kernel/events/core.Inspired by the Rings of the Olympic Games and stopwatch designs from the past, the Seamaster Olympic Games Collection has a unique style that is timeless and captivating. Retain the 'legacy' behaviour as a default.Īrch/x86/kernel/cpu/perf_event.c | 14 ++++++. Sanity checks such that we cannot combine events with different clocksĪnd since we then have per-event configurability we might as well Itįurther makes this configurable on a per-event basis, but adds a few The below patch makes the distinction between these two cases byĪdding perf_event_clock() which is used for the second case. However, for 2) it doesn't really matter, perf itself doesn't care Why we had to have a global perf_clock(). This means configurability now 1) makes that hard because it needs toīe internally consistent across groups of unrelated events which is Offset), MONOTNIC_RAW is required for correlating against a fixed rate Where MONOTONIC is good for correlating between machines (static And here we have theĭiscussion on MONOTONIC vs MONOTONIC_RAW etc. The second however is what people are worried about when having to ![]() In what time base that happens, its all relative information, as long The first is all about tracking time deltas, nobody should really care Which includes the self-monitoring support in structĢ) the actual timestamps visible in the data records. While thinking on the whole clock discussion it occured to me we haveġ) the tracking of event/ctx/cgroup enabled/running/stopped times 8:13 ` Adrian Hunter 1 sibling, 2 replies 10+ messages in thread 14:29 ` time: Add ktime_get_mono_raw_fast_ns() Peter 14:29 ` Peter Zijlstra ![]() + update_fast_timekeeper(&tk_fast_mono_raw, &tkr) + update_fast_timekeeper(&tk_fast_mono, &tk->tkr) Memcpy(&shadow_timekeeper, &tk_core.timekeeper, Tk->ntp_error = -489,7 +512,12 static void timekeeping_update(struct ti Static void timekeeping_update(struct timekeeper *tk, unsigned int action) #ifdef -475,6 +496,8 static inline void tk_update_ktime_data( + update_fast_timekeeper(&tk_fast_mono_raw, &tkr_dummy) + update_fast_timekeeper(&tk_fast_mono, &tkr_dummy) Memcpy(&tkr_dummy, tkr, sizeof(tkr_dummy)) Ĭycles_at_suspend = tkr->read(tkr->clock) Static cycle_t -358,7 +375,11 static void halt_fast_timekeeper(struct * Suspend-time cycles value for halted fast timekeeper. +EXPORT_SYMBOL_GPL(ktime_get_mono_raw_fast_ns) + } while (read_seqcount_retry(&tk_fast_mono_raw.seq, seq)) + now = ktime_to_ns(tkr->base_mono) + timekeeping_get_ns(tkr) + tkr = tk_fast_mono_raw.base + (seq & 0x01) + seq = raw_read_seqcount(&tk_fast_mono_raw.seq) +u64 notrace ktime_get_mono_raw_fast_ns(void) Memcpy(base + 1, base, -332,6 +333,22 u64 notrace ktime_get_mono_fast_ns(void)ĮXPORT_SYMBOL_GPL(ktime_get_mono_fast_ns) + struct tk_read_base *base = fast->base struct tk_read_base *base = tk_fast_mono.base +static void update_fast_timekeeper(struct tk_fast *fast, struct tk_read_base *tkr) * void update_fast_timekeeper(struct tk_read_base *tkr) * slightly wrong timestamp (a few nanoseconds). Int _read_mostly -267,18 +268,18 static inline s64 timekeeping_get_ns_raw * flag for if timekeeping is suspended */ +static struct tk_fast tk_fast_mono_raw _cacheline_aligned +static struct tk_fast tk_fast_mono _cacheline_aligned static struct tk_fast tk_fast_mono _cacheline_aligned * Timespec interfaces utilizing the ktime based ones +extern u64 ktime_get_mono_raw_fast_ns(void) I suppose the right place would be a resume callback somewhere. Mono_raw clock state in timekeeping_update() for now, even though its The implementation is up for discussion but given the need for theĭummy thing I thought it was easiest to just always update the ![]() 14:29 On perf and clocks Peter 14:29 ` Peter Zijlstraġ sibling, 1 reply 10+ messages in threadīy popular demand, add a MONOTONIC_RAW variant. Tglx, rostedt, sonnyrao, ak, vincent.weaver, Peter ZijlstraĬhangelog for patch 2 has the goodies. To: pawel.moll, adrian.hunter, john.stultz, mingo, eranianĬc: linux-kernel, acme, dsahern, fweisbec, jolsa, namhyung, paulus, 14:29 ` perf: Add per event clockid support Peter ZijlstraĠ siblings, 2 replies 10+ messages in threadįrom: Peter Zijlstra 14:29 UTC ( / raw) 14:29 ` time: Add ktime_get_mono_raw_fast_ns() Peter Zijlstra LKML Archive on help / color / mirror / Atom feed * On perf and clocks. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |