/kernel/sched/ |
D | walt.c | 66 static inline void fixup_cum_window_demand(struct rq *rq, s64 delta) in fixup_cum_window_demand() argument 68 rq->cum_window_demand += delta; in fixup_cum_window_demand() 206 s64 delta; in update_window_start() local 209 delta = wallclock - rq->window_start; in update_window_start() 211 if (delta < 0) { in update_window_start() 212 delta = 0; in update_window_start() 216 if (delta < walt_ravg_window) in update_window_start() 219 nr_windows = div64_u64(delta, walt_ravg_window); in update_window_start() 230 static u64 scale_exec_time(u64 delta, struct rq *rq) in scale_exec_time() argument 234 return (delta * capcurr) >> SCHED_CAPACITY_SHIFT; in scale_exec_time() [all …]
|
D | loadavg.c | 83 long nr_active, delta = 0; in calc_load_fold_active() local 89 delta = nr_active - this_rq->calc_load_active; in calc_load_fold_active() 93 return delta; in calc_load_fold_active() 185 long delta; in calc_load_enter_idle() local 191 delta = calc_load_fold_active(this_rq, 0); in calc_load_enter_idle() 192 if (delta) { in calc_load_enter_idle() 195 atomic_long_add(delta, &calc_load_idle[idx]); in calc_load_enter_idle() 222 long delta = 0; in calc_load_fold_idle() local 225 delta = atomic_long_xchg(&calc_load_idle[idx], 0); in calc_load_fold_idle() 227 return delta; in calc_load_fold_idle() [all …]
|
D | stats.h | 8 rq_sched_info_arrive(struct rq *rq, unsigned long long delta) in rq_sched_info_arrive() argument 11 rq->rq_sched_info.run_delay += delta; in rq_sched_info_arrive() 20 rq_sched_info_depart(struct rq *rq, unsigned long long delta) in rq_sched_info_depart() argument 23 rq->rq_cpu_time += delta; in rq_sched_info_depart() 27 rq_sched_info_dequeued(struct rq *rq, unsigned long long delta) in rq_sched_info_dequeued() argument 30 rq->rq_sched_info.run_delay += delta; in rq_sched_info_dequeued() 41 rq_sched_info_arrive(struct rq *rq, unsigned long long delta) in rq_sched_info_arrive() argument 44 rq_sched_info_dequeued(struct rq *rq, unsigned long long delta) in rq_sched_info_dequeued() argument 47 rq_sched_info_depart(struct rq *rq, unsigned long long delta) in rq_sched_info_depart() argument 71 unsigned long long now = rq_clock(rq), delta = 0; in sched_info_dequeued() local [all …]
|
D | cputime.c | 48 s64 delta; in irqtime_account_irq() local 62 delta = sched_clock_cpu(cpu) - irqtime->irq_start_time; in irqtime_account_irq() 63 irqtime->irq_start_time += delta; in irqtime_account_irq() 73 irqtime->hardirq_time += delta; in irqtime_account_irq() 75 irqtime->softirq_time += delta; in irqtime_account_irq() 84 walt_account_irqtime(cpu, curr, delta, wallclock); in irqtime_account_irq() 753 cputime_t delta, other; in get_vtime_delta() local 762 delta = jiffies_to_cputime(now - tsk->vtime_snap); in get_vtime_delta() 763 other = account_other_time(delta); in get_vtime_delta() 767 return delta - other; in get_vtime_delta() [all …]
|
D | clock.c | 203 s64 delta; in sched_clock_local() local 207 delta = now - scd->tick_raw; in sched_clock_local() 208 if (unlikely(delta < 0)) in sched_clock_local() 209 delta = 0; in sched_clock_local() 219 clock = scd->tick_gtod + delta; in sched_clock_local()
|
D | fair.c | 491 s64 delta = (s64)(vruntime - max_vruntime); in max_vruntime() local 492 if (delta > 0) in max_vruntime() 500 s64 delta = (s64)(vruntime - min_vruntime); in min_vruntime() local 501 if (delta < 0) in min_vruntime() 658 static inline u64 calc_delta_fair(u64 delta, struct sched_entity *se) in calc_delta_fair() argument 661 delta = __calc_delta(delta, NICE_0_LOAD, &se->load); in calc_delta_fair() 663 return delta; in calc_delta_fair() 908 u64 delta; in update_stats_wait_end() local 913 delta = rq_clock(rq_of(cfs_rq)) - schedstat_val(se->statistics.wait_start); in update_stats_wait_end() 923 schedstat_set(se->statistics.wait_start, delta); in update_stats_wait_end() [all …]
|
D | cpufreq_schedutil.c | 208 s64 delta; in sugov_get_util() local 213 delta = time - rq->age_stamp; in sugov_get_util() 214 if (unlikely(delta < 0)) in sugov_get_util() 215 delta = 0; in sugov_get_util() 216 rt = div64_u64(rq->rt_avg, sched_avg_period() + delta); in sugov_get_util()
|
D | core.c | 99 static void update_rq_clock_task(struct rq *rq, s64 delta); 103 s64 delta; in update_rq_clock() local 110 delta = sched_clock_cpu(cpu_of(rq)) - rq->clock; in update_rq_clock() 111 if (delta < 0) in update_rq_clock() 113 rq->clock += delta; in update_rq_clock() 114 update_rq_clock_task(rq, delta); in update_rq_clock() 313 s64 delta; in hrtick_start() local 319 delta = max_t(s64, delay, 10000LL); in hrtick_start() 320 time = ktime_add_ns(timer->base->get_time(), delta); in hrtick_start() 801 static void update_rq_clock_task(struct rq *rq, s64 delta) in update_rq_clock_task() argument [all …]
|
/kernel/trace/ |
D | trace_benchmark.c | 38 u64 delta; in trace_do_benchmark() local 57 delta = stop - start; in trace_do_benchmark() 64 bm_first = delta; in trace_do_benchmark() 70 bm_last = delta; in trace_do_benchmark() 72 if (delta > bm_max) in trace_do_benchmark() 73 bm_max = delta; in trace_do_benchmark() 74 if (!bm_min || delta < bm_min) in trace_do_benchmark() 75 bm_min = delta; in trace_do_benchmark() 89 bm_total += delta; in trace_do_benchmark() 90 bm_totalsq += delta * delta; in trace_do_benchmark() [all …]
|
D | trace_irqsoff.c | 293 static bool report_latency(struct trace_array *tr, cycle_t delta) in report_latency() argument 296 if (delta < tracing_thresh) in report_latency() 299 if (delta <= tr->max_latency) in report_latency() 311 cycle_t T0, T1, delta; in check_critical_timing() local 317 delta = T1-T0; in check_critical_timing() 323 if (!report_latency(tr, delta)) in check_critical_timing() 329 if (!report_latency(tr, delta)) in check_critical_timing() 342 tr->max_latency = delta; in check_critical_timing()
|
D | ring_buffer.c | 355 static inline int test_time_stamp(u64 delta) in test_time_stamp() argument 357 if (delta & TS_DELTA_TEST) in test_time_stamp() 411 u64 delta; member 2246 rb_add_time_stamp(struct ring_buffer_event *event, u64 delta) in rb_add_time_stamp() argument 2252 event->time_delta = delta & TS_MASK; in rb_add_time_stamp() 2253 event->array[0] = delta >> TS_SHIFT; in rb_add_time_stamp() 2283 u64 delta = info->delta; in rb_update_event() local 2287 delta = 0; in rb_update_event() 2294 event = rb_add_time_stamp(event, delta); in rb_update_event() 2296 delta = 0; in rb_update_event() [all …]
|
D | trace_sched_wakeup.c | 349 static bool report_latency(struct trace_array *tr, cycle_t delta) in report_latency() argument 352 if (delta < tracing_thresh) in report_latency() 355 if (delta <= tr->max_latency) in report_latency() 431 cycle_t T0, T1, delta; in probe_wakeup_sched_switch() local 477 delta = T1-T0; in probe_wakeup_sched_switch() 479 if (!report_latency(wakeup_trace, delta)) in probe_wakeup_sched_switch() 483 wakeup_trace->max_latency = delta; in probe_wakeup_sched_switch()
|
/kernel/time/ |
D | tick-sched.c | 55 ktime_t delta; in tick_do_update_jiffies64() local 60 delta = ktime_sub(now, last_jiffies_update); in tick_do_update_jiffies64() 61 if (delta.tv64 < tick_period.tv64) in tick_do_update_jiffies64() 67 delta = ktime_sub(now, last_jiffies_update); in tick_do_update_jiffies64() 68 if (delta.tv64 >= tick_period.tv64) { in tick_do_update_jiffies64() 70 delta = ktime_sub(delta, tick_period); in tick_do_update_jiffies64() 75 if (unlikely(delta.tv64 >= tick_period.tv64)) { in tick_do_update_jiffies64() 78 ticks = ktime_divns(delta, incr); in tick_do_update_jiffies64() 537 ktime_t delta; in update_ts_time_stats() local 540 delta = ktime_sub(now, ts->idle_entrytime); in update_ts_time_stats() [all …]
|
D | clockevents.c | 244 int64_t delta; in clockevents_program_min_delta() local 248 delta = dev->min_delta_ns; in clockevents_program_min_delta() 249 dev->next_event = ktime_add_ns(ktime_get(), delta); in clockevents_program_min_delta() 255 clc = ((unsigned long long) delta * dev->mult) >> dev->shift; in clockevents_program_min_delta() 283 int64_t delta; in clockevents_program_min_delta() local 285 delta = dev->min_delta_ns; in clockevents_program_min_delta() 286 dev->next_event = ktime_add_ns(ktime_get(), delta); in clockevents_program_min_delta() 292 clc = ((unsigned long long) delta * dev->mult) >> dev->shift; in clockevents_program_min_delta() 310 int64_t delta; in clockevents_program_event() local 331 delta = ktime_to_ns(ktime_sub(expires, ktime_get())); in clockevents_program_event() [all …]
|
D | timekeeping.c | 118 static inline void tk_update_sleep_time(struct timekeeper *tk, ktime_t delta) in tk_update_sleep_time() argument 120 tk->offs_boot = ktime_add(tk->offs_boot, delta); in tk_update_sleep_time() 188 cycle_t now, last, mask, max, delta; in timekeeping_get_delta() local 206 delta = clocksource_delta(now, last, mask); in timekeeping_get_delta() 212 if (unlikely((~delta & mask) < (mask >> 3))) { in timekeeping_get_delta() 214 delta = 0; in timekeeping_get_delta() 218 if (unlikely(delta > max)) { in timekeeping_get_delta() 220 delta = tkr->clock->max_cycles; in timekeeping_get_delta() 223 return delta; in timekeeping_get_delta() 231 cycle_t cycle_now, delta; in timekeeping_get_delta() local [all …]
|
D | timecounter.c | 95 u64 delta = (cycle_tstamp - tc->cycle_last) & tc->cc->mask; in timecounter_cyc2time() local 103 if (delta > tc->cc->mask / 2) { in timecounter_cyc2time() 104 delta = (tc->cycle_last - cycle_tstamp) & tc->cc->mask; in timecounter_cyc2time() 105 nsec -= cc_cyc2ns_backwards(tc->cc, delta, tc->mask, frac); in timecounter_cyc2time() 107 nsec += cyclecounter_cyc2ns(tc->cc, delta, tc->mask, &frac); in timecounter_cyc2time()
|
D | alarmtimer.c | 242 ktime_t delta; in alarmtimer_suspend() local 249 delta = ktime_sub(next->expires, base->gettime()); in alarmtimer_suspend() 250 if (!min.tv64 || (delta.tv64 < min.tv64)) in alarmtimer_suspend() 251 min = delta; in alarmtimer_suspend() 298 ktime_t delta; in alarmtimer_freezerset() local 302 delta = ktime_sub(absexp, base->gettime()); in alarmtimer_freezerset() 305 if (!freezer_delta.tv64 || (delta.tv64 < freezer_delta.tv64)) in alarmtimer_freezerset() 306 freezer_delta = delta; in alarmtimer_freezerset() 419 ktime_t delta; in alarm_forward() local 421 delta = ktime_sub(now, alarm->node.expires); in alarm_forward() [all …]
|
D | ntp.c | 400 s64 delta; in second_overflow() local 465 delta = ntp_offset_chunk(time_offset); in second_overflow() 466 time_offset -= delta; in second_overflow() 467 tick_length += delta; in second_overflow() 877 long delta, delta_mod; in hardpps_update_freq() local 897 delta = shift_right(ftemp - pps_freq, NTP_SCALE_SHIFT); in hardpps_update_freq() 899 if (delta > PPS_MAXWANDER || delta < -PPS_MAXWANDER) { in hardpps_update_freq() 901 "hardpps: PPSWANDER: change=%ld\n", delta); in hardpps_update_freq() 913 delta_mod = delta; in hardpps_update_freq() 927 return delta; in hardpps_update_freq()
|
D | hrtimer.c | 826 ktime_t delta; in hrtimer_forward() local 828 delta = ktime_sub(now, hrtimer_get_expires(timer)); in hrtimer_forward() 830 if (delta.tv64 < 0) in hrtimer_forward() 839 if (unlikely(delta.tv64 >= interval.tv64)) { in hrtimer_forward() 842 orun = ktime_divns(delta, incr); in hrtimer_forward() 1333 ktime_t expires_next, now, entry_time, delta; in hrtimer_interrupt() local 1398 delta = ktime_sub(now, entry_time); in hrtimer_interrupt() 1399 if ((unsigned int)delta.tv64 > cpu_base->max_hang_time) in hrtimer_interrupt() 1400 cpu_base->max_hang_time = (unsigned int) delta.tv64; in hrtimer_interrupt() 1405 if (delta.tv64 > 100 * NSEC_PER_MSEC) in hrtimer_interrupt() [all …]
|
D | timer.c | 477 unsigned long delta = expires - clk; in calc_wheel_index() local 480 if (delta < LVL_START(1)) { in calc_wheel_index() 482 } else if (delta < LVL_START(2)) { in calc_wheel_index() 484 } else if (delta < LVL_START(3)) { in calc_wheel_index() 486 } else if (delta < LVL_START(4)) { in calc_wheel_index() 488 } else if (delta < LVL_START(5)) { in calc_wheel_index() 490 } else if (delta < LVL_START(6)) { in calc_wheel_index() 492 } else if (delta < LVL_START(7)) { in calc_wheel_index() 494 } else if (LVL_DEPTH > 8 && delta < LVL_START(8)) { in calc_wheel_index() 496 } else if ((long) delta < 0) { in calc_wheel_index() [all …]
|
D | clocksource.c | 172 cycle_t csnow, wdnow, cslast, wdlast, delta; in clocksource_watchdog() local 205 delta = clocksource_delta(wdnow, cs->wd_last, watchdog->mask); in clocksource_watchdog() 206 wd_nsec = clocksource_cyc2ns(delta, watchdog->mult, in clocksource_watchdog() 209 delta = clocksource_delta(csnow, cs->cs_last, cs->mask); in clocksource_watchdog() 210 cs_nsec = clocksource_cyc2ns(delta, cs->mult, cs->shift); in clocksource_watchdog()
|
/kernel/ |
D | torture.c | 93 unsigned long delta; in torture_offline() local 118 delta = jiffies - starttime; in torture_offline() 119 sum_offl += delta; in torture_offline() 121 *min_offl = delta; in torture_offline() 122 *max_offl = delta; in torture_offline() 124 if (*min_offl > delta) in torture_offline() 125 *min_offl = delta; in torture_offline() 126 if (*max_offl < delta) in torture_offline() 127 *max_offl = delta; in torture_offline() 142 unsigned long delta; in torture_online() local [all …]
|
D | tsacct.c | 35 u64 delta; in bacct_add_tsk() local 40 delta = ktime_get_ns() - tsk->start_time; in bacct_add_tsk() 42 do_div(delta, NSEC_PER_USEC); in bacct_add_tsk() 43 stats->ac_etime = delta; in bacct_add_tsk() 45 do_div(delta, USEC_PER_SEC); in bacct_add_tsk() 46 stats->ac_btime = get_seconds() - delta; in bacct_add_tsk() 129 u64 delta; in __acct_update_integrals() local 137 delta = cputime_to_nsecs(dtime); in __acct_update_integrals() 139 if (delta < TICK_NSEC) in __acct_update_integrals() 148 tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm) >> 10; in __acct_update_integrals() [all …]
|
D | async.c | 118 ktime_t uninitialized_var(calltime), delta, rettime; in async_run_entry_fn() 130 delta = ktime_sub(rettime, calltime); in async_run_entry_fn() 134 (long long)ktime_to_ns(delta) >> 10); in async_run_entry_fn() 289 ktime_t uninitialized_var(starttime), delta, endtime; in async_synchronize_cookie_domain() 300 delta = ktime_sub(endtime, starttime); in async_synchronize_cookie_domain() 304 (long long)ktime_to_ns(delta) >> 10); in async_synchronize_cookie_domain()
|
/kernel/bpf/ |
D | verifier.c | 3339 int i, cnt, delta = 0; in convert_ctx_accesses() local 3353 delta += cnt - 1; in convert_ctx_accesses() 3360 insn = env->prog->insnsi + delta; in convert_ctx_accesses() 3372 if (env->insn_aux_data[i + delta].ptr_type != PTR_TO_CTX) in convert_ctx_accesses() 3382 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt); in convert_ctx_accesses() 3386 delta += cnt - 1; in convert_ctx_accesses() 3390 insn = new_prog->insnsi + i + delta; in convert_ctx_accesses() 3409 int i, cnt, delta = 0; in fixup_bpf_calls() local 3421 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt); in fixup_bpf_calls() 3425 delta += cnt - 1; in fixup_bpf_calls() [all …]
|