uint64_t abstime, new_idle_timeout_ticks;
rtclock_timer_t *mytimer;
cpu_data_t *cpu_data_ptr;
+ processor_t processor;
cpu_data_ptr = getCpuDatap();
mytimer = &cpu_data_ptr->rtclock_timer; /* Point to the event timer */
new_idle_timeout_ticks = 0x0ULL;
KERNEL_DEBUG_CONSTANT_IST(KDEBUG_COMMON, MACHDBG_CODE(DBG_MACH_EXCP_DECI, 3) | DBG_FUNC_START, 0, 0, 0, 0, 0);
- ((idle_timer_t)cpu_data_ptr->idle_timer_notify)(cpu_data_ptr->idle_timer_refcon, &new_idle_timeout_ticks);
+ cpu_data_ptr->idle_timer_notify(cpu_data_ptr->idle_timer_refcon, &new_idle_timeout_ticks);
KERNEL_DEBUG_CONSTANT_IST(KDEBUG_COMMON, MACHDBG_CODE(DBG_MACH_EXCP_DECI, 3) | DBG_FUNC_END, 0, 0, 0, 0, 0);
/* if a new idle timeout was requested set the new idle timer deadline */
abstime = mach_absolute_time(); /* Get the time again since we ran a bit */
}
- uint64_t quantum_deadline = cpu_data_ptr->quantum_timer_deadline;
- /* is it the quantum timer expiration? */
- if ((quantum_deadline <= abstime) && (quantum_deadline > 0)) {
- cpu_data_ptr->quantum_timer_deadline = 0;
- quantum_timer_expire(abstime);
- }
+ processor = PERCPU_GET_RELATIVE(processor, cpu_data, cpu_data_ptr);
+ (void)running_timers_expire(processor, abstime);
+ /*
+ * No need to update abstime.
+ */
/* Force reload our next deadline */
cpu_data_ptr->rtcPop = EndOfAllTime;
splx(s);
}
-void
-quantum_timer_set_deadline(uint64_t deadline)
-{
- cpu_data_t *cpu_data_ptr;
-
- /* We should've only come into this path with interrupts disabled */
- assert(ml_get_interrupts_enabled() == FALSE);
-
- cpu_data_ptr = getCpuDatap();
- cpu_data_ptr->quantum_timer_deadline = deadline;
- timer_resync_deadlines();
-}
-
/*
* Re-evaluate the outstanding deadlines and select the most proximate.
*
deadline = cpu_data_ptr->idle_timer_deadline;
}
- /* If we have the quantum timer setup, check that */
- if ((cpu_data_ptr->quantum_timer_deadline > 0)
- && (cpu_data_ptr->quantum_timer_deadline < deadline)) {
- deadline = cpu_data_ptr->quantum_timer_deadline;
+ uint64_t run_deadline = running_timers_deadline(
+ PERCPU_GET_RELATIVE(processor, cpu_data, cpu_data_ptr));
+ if (run_deadline < deadline) {
+ deadline = run_deadline;
}
if ((deadline == EndOfAllTime)
.timer_coalesce_kt_ns_max = 1 * NSEC_PER_MSEC,
.timer_coalesce_fp_ns_max = 1 * NSEC_PER_MSEC,
.timer_coalesce_ts_ns_max = 1 * NSEC_PER_MSEC,
+#if XNU_TARGET_OS_OSX
+ .latency_qos_scale = {3, 2, 1, -2, 3, 3},
+ .latency_qos_ns_max = {1 * NSEC_PER_MSEC, 5 * NSEC_PER_MSEC, 20 * NSEC_PER_MSEC,
+ 75 * NSEC_PER_MSEC, 1 * NSEC_PER_MSEC, 1 * NSEC_PER_MSEC},
+ .latency_tier_rate_limited = {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE},
+#else /* XNU_TARGET_OS_OSX */
.latency_qos_scale = {3, 2, 1, -2, -15, -15},
.latency_qos_ns_max = {1 * NSEC_PER_MSEC, 5 * NSEC_PER_MSEC, 20 * NSEC_PER_MSEC,
75 * NSEC_PER_MSEC, 10000 * NSEC_PER_MSEC, 10000 * NSEC_PER_MSEC},
.latency_tier_rate_limited = {FALSE, FALSE, FALSE, FALSE, TRUE, TRUE},
+#endif /* XNU_TARGET_OS_OSX */
};
timer_coalescing_priority_params_ns_t *
timer_call_get_priority_params(void)