/linux/kernel/time/ |
H A D | tick-sched.h | 17 /* The CPU is in the tick idle mode */ 19 /* The idle tick has been stopped */ 22 * Indicator that the CPU is actively in the tick idle mode; 30 /* High resolution tick mode */ 34 * struct tick_sched - sched tick emulation and no idle tick control/stats 37 * @got_idle_tick: Tick timer function has run with @inidle set 39 * @last_tick_jiffies: Value of jiffies seen on last tick 40 * @sched_timer: hrtimer to schedule the periodic tick in high 42 * @last_tick: Store the last tick expiry time when the tick 44 * to resume the tick timer operation in the timeline [all …]
|
H A D | tick-sched.c | 33 #include "tick-internal.h" 167 * Ensure that the tick is aligned to a multiple of in tick_init_jiffy_update() 256 * When we are idle and the tick is stopped, we have to touch in tick_sched_handle() 269 * In case the current tick fired too early past its expected in tick_sched_handle() 302 * In dynticks mode, tick reprogram is deferred: in tick_nohz_handler() 382 /* Empty, the tick restart happens on tick_nohz_irq_exit() */ in nohz_full_kick_func() 390 * re-evaluate its dependency on the tick and restart it if necessary. 404 * re-evaluate its dependency on the tick and restart it if necessary. 441 * we guarantee it sees the new tick dependency upon in tick_nohz_kick_task() 462 * their dependency on the tick and restart it if necessary. [all …]
|
H A D | tick-common.c | 3 * This file contains the base functions to manage periodic tick 24 #include "tick-internal.h" 27 * Tick devices 31 * Tick next event: keeps track of the tick time. It's updated by the 32 * CPU which handles the tick and protected by jiffies_lock. There is 84 * Periodic tick 92 /* Keep track of the next tick event */ in tick_periodic() 149 * Setup the device for a periodic tick 182 * Setup the tick devic [all...] |
H A D | jiffies.c | 13 #include "tick-internal.h" 28 * interrupt hardware to accurately tick at the 30 * for "tick-less" systems. 89 /* Calc cycles per tick */ in register_refined_jiffies()
|
H A D | tick-oneshot.c | 3 * This file contains functions which manage high resolution tick 18 #include "tick-internal.h" 83 pr_cont(" no tick device\n"); in tick_switch_to_oneshot()
|
H A D | tick-legacy.c | 3 * Timer tick function for architectures that lack generic clockevents, 11 #include "tick-internal.h"
|
/linux/sound/core/seq/ |
H A D | seq_timer.h | 13 snd_seq_tick_time_t cur_tick; /* current tick */ 14 unsigned long resolution; /* time per tick in nsec */ 15 unsigned long fraction; /* current time per tick in nsec */ 24 unsigned int tempo; /* current tempo, us/tick */ 28 struct snd_seq_timer_tick tick; /* current tick */ member 54 static inline void snd_seq_timer_update_tick(struct snd_seq_timer_tick *tick, in snd_seq_timer_update_tick() argument 57 if (tick->resolution > 0) { in snd_seq_timer_update_tick() 58 tick->fraction += resolution; in snd_seq_timer_update_tick() 59 tick->cur_tick += (unsigned int)(tick->fraction / tick->resolution); in snd_seq_timer_update_tick() 60 tick->fraction %= tick->resolution; in snd_seq_timer_update_tick()
|
H A D | seq_timer.c | 27 tmr->tick.resolution = (tmr->tempo * tmr->tempo_base) / tmr->ppq; in snd_seq_timer_set_tick_resolution() 33 tmr->tick.resolution = (tmr->tempo / tmr->ppq) * tmr->tempo_base; in snd_seq_timer_set_tick_resolution() 34 tmr->tick.resolution += s; in snd_seq_timer_set_tick_resolution() 36 if (tmr->tick.resolution <= 0) in snd_seq_timer_set_tick_resolution() 37 tmr->tick.resolution = 1; in snd_seq_timer_set_tick_resolution() 38 snd_seq_timer_update_tick(&tmr->tick, 0); in snd_seq_timer_set_tick_resolution() 106 tmr->tick.cur_tick = 0; in seq_timer_reset() 107 tmr->tick.fraction = 0; in seq_timer_reset() 145 /* calculate current tick */ in snd_seq_timer_interrupt() 146 snd_seq_timer_update_tick(&tmr->tick, resolution); in snd_seq_timer_interrupt() [all …]
|
H A D | seq_prioq.c | 91 return (snd_seq_compare_tick_time(&a->time.tick, &b->time.tick)); in compare_timestamp() 108 if (a->time.tick > b->time.tick) in compare_timestamp_rel() 110 else if (a->time.tick == b->time.tick) in compare_timestamp_rel() 202 return snd_seq_compare_tick_time(current_time, &ev->time.tick); in event_is_ready() 308 if (cell->event.time.tick) in prioq_match() 357 res = snd_seq_compare_tick_time(&ev->time.tick, &info->time.tick); in prioq_remove_match() 365 res = snd_seq_compare_tick_time(&ev->time.tick, &info->time.tick); in prioq_remove_match()
|
/linux/Documentation/admin-guide/pm/ |
H A D | cpuidle.rst | 165 tick can be `stopped by the idle loop <idle-cpus-and-tick_>`_. Available 186 .. _idle-cpus-and-tick: 188 Idle CPUs and The Scheduler Tick 191 The scheduler tick is a timer that triggers periodically in order to implement 199 may not want to give the CPU away voluntarily, however, and the scheduler tick 201 tick, but it is the primary reason for using it. 203 The scheduler tick is problematic from the CPU idle time management perspective, 205 configuration, the length of the tick period is between 1 ms and 10 ms). 206 Thus, if the tick is allowed to trigger on idle CPUs, it will not make sense 208 the tick period length. Moreover, in that case the idle duration of any CPU [all …]
|
/linux/Documentation/timers/ |
H A D | highres.rst | 100 System-level global event devices are used for the Linux periodic tick. Per-CPU 107 - system global periodic tick (jiffies update) 132 utilize the high resolution and dynamic tick functionalities without any change 136 adding the dynamic tick specific calls to the idle routine (a total of 3 lines 186 Once a system has switched to high resolution mode, the periodic tick is 190 The periodic tick functionality is provided by an per-cpu hrtimer. The callback 193 based periodic tick is designed to be extended with dynamic tick functionality. 195 timer and periodic events (jiffies tick, profiling, process accounting) on UP 200 separated from the tick bound timer softirq to allow accurate delivery of high 211 Dynamic ticks are the logical consequence of the hrtimer based periodic tick [all …]
|
H A D | no_hz.rst | 128 adaptive-tick CPUs: At least one non-adaptive-tick CPU must remain 130 calls like gettimeofday() returns accurate values on adaptive-tick CPUs. 144 Just as with dyntick-idle mode, the benefits of adaptive-tick mode do 156 3. POSIX CPU timers prevent CPUs from entering adaptive-tick mode. 162 all of them over time. Adaptive-tick mode may prevent this 165 entering adaptive-tick mode. 167 5. Scheduler statistics for adaptive-tick CPUs may be computed 168 slightly differently than those for non-adaptive-tick CPUs. 181 enter either dyntick-idle mode or adaptive-tick mode, the most 193 or adaptive-tick mode. That said, note that it is up to userspace to [all …]
|
/linux/arch/sparc/include/asm/ |
H A D | timer_64.h | 47 unsigned int tick[GET_TICK_NINSTR]; member 56 unsigned long tick, tmp1, tmp2; in get_tick() local 80 /* read tick 2 instructions and 11 skipped */ in get_tick() 82 " rd %%tick, %0\n" in get_tick() 92 : "=&r" (tick), "=&r" (tmp1), "=&r" (tmp2) in get_tick() 95 return tick; in get_tick()
|
/linux/arch/sparc/kernel/ |
H A D | time_64.c | 71 /* Set things up so user can access tick register for profiling in tick_disable_protection() 73 * read back of %tick after writing it. in tick_disable_protection() 79 "1: rd %%tick, %%g2\n" in tick_disable_protection() 82 " wrpr %%g2, 0, %%tick\n" in tick_disable_protection() 83 " rdpr %%tick, %%g0" in tick_disable_protection() 111 __asm__ __volatile__("rd %%tick, %0\n\t" in tick_get_tick() 122 __asm__ __volatile__("rd %%tick, %0" in tick_add_compare() 145 __asm__ __volatile__("rd %%tick, %0" in tick_add_compare() 157 __asm__ __volatile__("rd %%tick, %0\n\t" in tick_add_tick() 159 "wrpr %0, 0, %%tick\n\t" in tick_add_tick() [all …]
|
/linux/drivers/net/wireless/ath/carl9170/ |
H A D | cmd.c | 173 unsigned int tick; in carl9170_collect_tally() local 181 tick = le32_to_cpu(tally.tick); in carl9170_collect_tally() 182 if (tick) { in carl9170_collect_tally() 183 ar->tally.active += le32_to_cpu(tally.active) / tick; in carl9170_collect_tally() 184 ar->tally.cca += le32_to_cpu(tally.cca) / tick; in carl9170_collect_tally() 185 ar->tally.tx_time += le32_to_cpu(tally.tx_time) / tick; in carl9170_collect_tally()
|
/linux/drivers/cpuidle/governors/ |
H A D | teo.c | 60 * the tick period length and uses this information when deciding whether or not 61 * to stop the scheduler tick. 93 * enough, return it and prevent the scheduler tick from being stopped. 104 #include <linux/tick.h> 266 * @stop_tick: Indication on whether or not to stop the scheduler tick. 345 * allow the tick to be stopped it is shallow enough. in teo_select() 366 * Take the possible duration limitation present if the tick in teo_select() 468 * If the selected state's target residency is below the tick length in teo_select() 469 * and intercepts occurring before the tick length are the majority of in teo_select() 470 * total wakeup events, do not stop the tick. in teo_select() [all …]
|
/linux/drivers/clocksource/ |
H A D | bcm_kona_timer.c | 37 * We use the peripheral timers for system tick, the cpu global timer for 38 * profile tick 112 /* Load the "next" event tick value */ in kona_timer_set_next_event() 180 "Kona Timer Tick", NULL)) in kona_timer_init() 181 pr_err("%s: request_irq() failed\n", "Kona Timer Tick"); in kona_timer_init()
|
/linux/arch/openrisc/kernel/ |
H A D | time.c | 62 /* This is the clock event device based on the OR1K tick timer. 64 * timers) we cannot enable the PERIODIC feature. The tick timer can run using 137 * This sets up the OpenRISC Tick Timer as a clock source. The tick timer 172 panic("Linux not supported on devices without tick timer"); in time_init()
|
/linux/include/linux/ |
H A D | timekeeper_internal.h | 69 * apply the tick length for an entire tick, as 70 * ntp_tick_length may change mid-tick, and we don't 71 * want to apply that new value to the tick in 111 * tick.
|
/linux/sound/firewire/motu/ |
H A D | amdtp-motu.c | 314 unsigned int tick; in cache_event_offsets() local 316 tick = ((sph & CIP_SPH_CYCLE_MASK) >> CIP_SPH_CYCLE_SHIFT) * TICKS_PER_CYCLE + in cache_event_offsets() 319 if (tick < base_tick) in cache_event_offsets() 320 tick += TICKS_PER_SECOND; in cache_event_offsets() 321 event_offsets[cache_tail] = tick - base_tick; in cache_event_offsets() 383 unsigned int tick = (base_tick + event_offsets[cache_head]) % TICKS_PER_SECOND; in write_sph() local 384 u32 sph = ((tick / TICKS_PER_CYCLE) << CIP_SPH_CYCLE_SHIFT) | (tick % TICKS_PER_CYCLE); in write_sph()
|
/linux/arch/loongarch/kvm/ |
H A D | timer.c | 11 * ktime_to_tick() - Scale ktime_t to timer tick value. 21 static inline u64 tick_to_ns(struct kvm_vcpu *vcpu, u64 tick) in tick_to_ns() argument 23 return div_u64(tick * MNSEC_PER_SEC, vcpu->arch.timer_mhz); in tick_to_ns() 110 * Set remainder tick value if not expired in kvm_restore_timer()
|
/linux/include/xen/interface/hvm/ |
H A D | params.h | 73 * internal tick alarm is not disabled if the VCPU is preempted during the 74 * next tick period. 76 * Missed interrupts are collapsed together and delivered as one 'late tick'.
|
/linux/arch/arm/mach-omap1/ |
H A D | Kconfig | 72 support for no tick during idle. The 32KHz timer provides less 73 intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is 86 timer provides more intra-tick resolution than the 32KHz timer,
|
/linux/kernel/sched/ |
H A D | idle.c | 194 * available. Possibly also suspend the local tick and the entire in cpuidle_idle_call() 303 * again to reprogram the tick. in do_idle() 317 * detected in the wakeup from idle path that the tick in do_idle() 385 * Only FIFO tasks can disable the tick since they don't need the forced in play_idle_precise() 487 * scheduler tick hitting a task of our scheduling class. 489 * NOTE: This function can be called remotely by the tick offload that
|
H A D | cputime.c | 323 * those pending times and rely only on values updated on tick or in thread_group_cputime() 354 * Account a tick to a process and cpustat 356 * @user_tick: is the tick from userspace 359 * Tick demultiplexing follows the order 468 * Account a single tick of CPU time. 470 * @user_tick: indicates if the tick is a user or a system tick 524 * Adjust tick based cputime random precision against scheduler runtime 527 * Tick based cputime accounting depend on random scheduling timeslices of a 533 * Fix this by scaling these tick base [all...] |