Home
last modified time | relevance | path

Searched refs:now (Results 1 – 25 of 1294) sorted by relevance

12345678910>>...52

/linux/tools/testing/selftests/timens/
H A Dvfork_exec.c24 struct timespec *now; member
30 struct timespec *now = args->now, tst; in tcheck() local
35 if (labs(tst.tv_sec - now->tv_sec) > 5) { in tcheck()
37 args->tst_name, tst.tv_sec, now->tv_sec); in tcheck()
44 static int check_in_thread(char *tst_name, struct timespec *now) in check_in_thread() argument
48 .now = now, in check_in_thread()
60 static int check(char *tst_name, struct timespec *now) in check() argument
67 if (labs(tst.tv_sec - now in check()
79 struct timespec now; main() local
[all...]
H A Dexec.c23 struct timespec now, tst; in main() local
28 if (sscanf(argv[1], "%ld", &now.tv_sec) != 1) in main()
33 if (labs(tst.tv_sec - now.tv_sec) > 5) in main()
34 return pr_fail("%ld %ld\n", now.tv_sec, tst.tv_sec); in main()
45 clock_gettime(CLOCK_MONOTONIC, &now); in main()
55 if (labs(tst.tv_sec - now.tv_sec) > 5) in main()
57 now.tv_sec, tst.tv_sec); in main()
75 if (labs(tst.tv_sec - now.tv_sec - OFFSET) > 5) in main()
77 now.tv_sec + OFFSET, tst.tv_sec); in main()
81 snprintf(now_str, sizeof(now_str), "%ld", now in main()
[all...]
H A Dclock_nanosleep.c26 struct timespec *now, *rem; member
36 clock_nanosleep(args->clockid, args->abs ? TIMER_ABSTIME : 0, args->now, args->rem); in call_nanosleep()
43 struct timespec now = {}, rem; in run_test() local
44 struct thread_args args = { .now = &now, .rem = &rem, .clockid = clockid}; in run_test()
64 now.tv_sec = start.tv_sec; in run_test()
65 now.tv_nsec = start.tv_nsec; in run_test()
68 now.tv_sec += 3600; in run_test()
/linux/include/trace/events/
H A Diocost.h16 TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
19 TP_ARGS(iocg, path, now, last_period, cur_period, vtime),
24 __field(u64, now)
39 __entry->now = now->now;
40 __entry->vnow = now->vnow;
51 TP_printk("[%s:%s] now=%llu:%llu vrate=%llu "
55 __entry->now, __entry->vnow, __entry->vrate,
63 TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
[all...]
H A Dalarmtimer.h49 TP_PROTO(struct alarm *alarm, ktime_t now),
51 TP_ARGS(alarm, now),
57 __field(s64, now)
64 __entry->now = now;
67 TP_printk("alarmtimer:%p type:%s expires:%llu now:%llu",
71 __entry->now
77 TP_PROTO(struct alarm *alarm, ktime_t now),
79 TP_ARGS(alarm, now)
84 TP_PROTO(struct alarm *alarm, ktime_t now),
[all...]
H A Dtimer.h64 __field( unsigned long, now )
73 __entry->now = jiffies;
79 (long)__entry->expires - __entry->now,
100 __field( unsigned long, now )
107 __entry->now = jiffies;
112 TP_printk("timer=%p function=%ps now=%lu baseclk=%lu",
113 __entry->timer, __entry->function, __entry->now,
254 * @now: pointer to variable which contains current time of the
261 TP_PROTO(struct hrtimer *hrtimer, ktime_t *now),
263 TP_ARGS(hrtimer, now),
[all...]
/linux/tools/testing/selftests/net/netfilter/
H A Dconntrack_resize.sh79 local now=$(ip netns exec "$ns" conntrack -C)
81 if [ $now -ne "$count" ] ;then
82 echo "expected $count entries in $ns, not $now: $msg"
91 local now=$(date +%s)
92 local end=$((now + duration))
94 while [ $now -lt $end ]; do
96 now=$(date +%s)
117 local now=$(date +%s)
118 local end=$((now + duration))
122 while [ $now
[all...]
H A Dconntrack_reverse_clash.sh31 local now
33 now=$(date +%s)
34 end=$((now + 5))
36 while [ $now -lt $end ];do
38 now=$(date +%s)
/linux/kernel/sched/
H A Dpelt.c90 * ... |---x---|------| ... |------|-----x (now)
160 * (now) (~1ms ago) (~2ms ago)
181 ___update_load_sum(u64 now, struct sched_avg *sa, in ___update_load_sum() argument
186 delta = now - sa->last_update_time; in ___update_load_sum()
192 sa->last_update_time = now; in ___update_load_sum()
296 int __update_load_avg_blocked_se(u64 now, struct sched_entity *se) in __update_load_avg_blocked_se() argument
298 if (___update_load_sum(now, &se->avg, 0, 0, 0)) { in __update_load_avg_blocked_se()
307 int __update_load_avg_se(u64 now, struct cfs_rq *cfs_rq, struct sched_entity *se) in __update_load_avg_se() argument
309 if (___update_load_sum(now, &se->avg, !!se->on_rq, se_runnable(se), in __update_load_avg_se()
321 int __update_load_avg_cfs_rq(u64 now, struc argument
347 update_rt_rq_load_avg(u64 now,struct rq * rq,int running) update_rt_rq_load_avg() argument
373 update_dl_rq_load_avg(u64 now,struct rq * rq,int running) update_dl_rq_load_avg() argument
404 update_hw_load_avg(u64 now,struct rq * rq,u64 capacity) update_hw_load_avg() argument
479 u64 now = rq_clock_pelt(rq); update_other_load_avgs() local
[all...]
H A Dpsi.c278 u64 now, state_start; in get_recent_times() local
288 now = cpu_clock(cpu); in get_recent_times()
309 times[s] += now - state_start; in get_recent_times()
418 static void window_reset(struct psi_window *win, u64 now, u64 value, in window_reset() argument
421 win->start_time = now; in window_reset()
437 static u64 window_update(struct psi_window *win, u64 now, u64 value) in window_update() argument
442 elapsed = now - win->start_time; in window_update()
452 window_reset(win, now, value, growth); in window_update()
463 static void update_triggers(struct psi_group *group, u64 now, in update_triggers() argument
500 growth = window_update(&t->win, now, tota in update_triggers()
525 update_averages(struct psi_group * group,u64 now) update_averages() argument
583 u64 now; psi_avgs_work() local
613 init_rtpoll_triggers(struct psi_group * group,u64 now) init_rtpoll_triggers() argument
657 u64 now; psi_rtpoll_work() local
764 record_times(struct psi_group_cpu * groupc,u64 now) record_times() argument
798 psi_group_change(struct psi_group * group,int cpu,unsigned int clear,unsigned int set,u64 now,bool wake_clock) psi_group_change() argument
912 u64 now; psi_task_change() local
931 u64 now; psi_task_switch() local
1012 u64 now; psi_account_irqtime() local
1233 u64 now; psi_cgroup_restart() local
1249 u64 now; psi_show() local
[all...]
/linux/arch/x86/kernel/
H A Drtc.c35 int mach_set_cmos_time(const struct timespec64 *now) in mach_set_cmos_time() argument
37 unsigned long long nowtime = now->tv_sec; in mach_set_cmos_time()
56 void mach_get_cmos_time(struct timespec64 *now) in mach_get_cmos_time() argument
65 now->tv_sec = now->tv_nsec = 0; in mach_get_cmos_time()
71 now->tv_sec = now->tv_nsec = 0; in mach_get_cmos_time()
75 now->tv_sec = rtc_tm_to_time64(&tm); in mach_get_cmos_time()
76 now->tv_nsec = 0; in mach_get_cmos_time()
102 int update_persistent_clock64(struct timespec64 now) in update_persistent_clock64() argument
[all...]
H A Dpvclock.c129 struct timespec64 now; in pvclock_read_wallclock() local
142 now.tv_sec = wall_clock->sec; in pvclock_read_wallclock()
143 now.tv_nsec = wall_clock->nsec; in pvclock_read_wallclock()
148 delta += now.tv_sec * NSEC_PER_SEC + now.tv_nsec; in pvclock_read_wallclock()
150 now.tv_nsec = do_div(delta, NSEC_PER_SEC); in pvclock_read_wallclock()
151 now.tv_sec = delta; in pvclock_read_wallclock()
153 set_normalized_timespec64(ts, now.tv_sec, now.tv_nsec); in pvclock_read_wallclock()
/linux/block/
H A Dblk-iocost.c561 u64 now; member
963 static void ioc_refresh_vrate(struct ioc *ioc, struct ioc_now *now) in ioc_refresh_vrate() argument
965 s64 pleft = ioc->period_at + ioc->period_us - now->now; in ioc_refresh_vrate()
1042 static void ioc_now(struct ioc *ioc, struct ioc_now *now) in ioc_now() argument
1047 now->now_ns = blk_time_get_ns(); in ioc_now()
1048 now->now = ktime_to_us(now->now_ns); in ioc_now()
1061 now in ioc_now()
1066 ioc_start_period(struct ioc * ioc,struct ioc_now * now) ioc_start_period() argument
1085 __propagate_weights(struct ioc_gq * iocg,u32 active,u32 inuse,bool save,struct ioc_now * now) __propagate_weights() argument
1167 propagate_weights(struct ioc_gq * iocg,u32 active,u32 inuse,bool save,struct ioc_now * now) propagate_weights() argument
1253 weight_updated(struct ioc_gq * iocg,struct ioc_now * now) weight_updated() argument
1268 iocg_activate(struct ioc_gq * iocg,struct ioc_now * now) iocg_activate() argument
1353 iocg_kick_delay(struct ioc_gq * iocg,struct ioc_now * now) iocg_kick_delay() argument
1419 iocg_incur_debt(struct ioc_gq * iocg,u64 abs_cost,struct ioc_now * now) iocg_incur_debt() argument
1444 iocg_pay_debt(struct ioc_gq * iocg,u64 abs_vpay,struct ioc_now * now) iocg_pay_debt() argument
1501 iocg_kick_waitq(struct ioc_gq * iocg,bool pay_debt,struct ioc_now * now) iocg_kick_waitq() argument
1587 struct ioc_now now; iocg_waitq_timer_fn() local
1703 iocg_flush_stat_leaf(struct ioc_gq * iocg,struct ioc_now * now) iocg_flush_stat_leaf() argument
1727 iocg_flush_stat(struct list_head * target_iocgs,struct ioc_now * now) iocg_flush_stat() argument
1751 hweight_after_donation(struct ioc_gq * iocg,u32 old_hwi,u32 hwm,u32 usage,struct ioc_now * now) hweight_after_donation() argument
1856 transfer_surpluses(struct list_head * surpluses,struct ioc_now * now) transfer_surpluses() argument
2083 ioc_forgive_debts(struct ioc * ioc,u64 usage_us_sum,int nr_debtors,struct ioc_now * now) ioc_forgive_debts() argument
2175 ioc_check_iocgs(struct ioc * ioc,struct ioc_now * now) ioc_check_iocgs() argument
2247 struct ioc_now now; ioc_timer_fn() local
2470 adjust_inuse_and_calc_cost(struct ioc_gq * iocg,u64 vtime,u64 abs_cost,struct ioc_now * now) adjust_inuse_and_calc_cost() argument
2613 struct ioc_now now; ioc_rqos_throttle() local
2748 struct ioc_now now; ioc_rqos_merge() local
2989 struct ioc_now now; ioc_pd_init() local
3030 struct ioc_now now; ioc_pd_free() local
3101 struct ioc_now now; ioc_weight_write() local
[all...]
/linux/tools/power/cpupower/bench/
H A Dbenchmark.c35 long long now, then; in calculate_timespace() local
44 now = get_time(); in calculate_timespace()
48 timed = (unsigned int)(then - now); in calculate_timespace()
55 now = get_time(); in calculate_timespace()
59 timed = (unsigned int)(then - now); in calculate_timespace()
81 long long now, then; in start_benchmark() local
126 now = get_time(); in start_benchmark()
130 performance_time += then - now - sleep_time; in start_benchmark()
135 (long)(then - now), sleep_time, in start_benchmark()
152 now in start_benchmark()
[all...]
/linux/kernel/trace/
H A Dtrace_clock.c98 u64 now, prev_time; in trace_clock_global() local
116 now = sched_clock_cpu(this_cpu); in trace_clock_global()
118 /* Make sure that now is always greater than or equal to prev_time */ in trace_clock_global()
119 if ((s64)(now - prev_time) < 0) in trace_clock_global()
120 now = prev_time; in trace_clock_global()
133 if ((s64)(now - prev_time) < 0) in trace_clock_global()
134 now = prev_time; in trace_clock_global()
136 trace_clock_struct.prev_time = now; in trace_clock_global()
144 return now; in trace_clock_global()
/linux/drivers/md/bcache/
H A Dutil.c165 uint64_t now, duration, last; in bch_time_stats_update() local
169 now = local_clock(); in bch_time_stats_update()
170 duration = time_after64(now, start_time) in bch_time_stats_update()
171 ? now - start_time : 0; in bch_time_stats_update()
172 last = time_after64(now, stats->last) in bch_time_stats_update()
173 ? now - stats->last : 0; in bch_time_stats_update()
188 stats->last = now ?: 1; in bch_time_stats_update()
203 uint64_t now = local_clock(); in bch_next_delay() local
213 if (time_before64(now + NSEC_PER_SEC * 5LLU / 2LLU, d->next)) in bch_next_delay()
214 d->next = now in bch_next_delay()
[all...]
/linux/tools/testing/selftests/timers/
H A Dnanosleep.c91 struct timespec now, target, rel; in nanosleep_test() local
94 if (clock_gettime(clockid, &now)) in nanosleep_test()
96 target = timespec_add(now, ns); in nanosleep_test()
100 clock_gettime(clockid, &now); in nanosleep_test()
102 if (!in_order(target, now)) in nanosleep_test()
106 clock_gettime(clockid, &now); in nanosleep_test()
110 target = timespec_add(now, ns); in nanosleep_test()
112 clock_gettime(clockid, &now); in nanosleep_test()
114 if (!in_order(target, now)) in nanosleep_test()
/linux/kernel/time/
H A Dtimer_list.c23 u64 now; member
47 int idx, u64 now) in print_timer() argument
55 (long long)(ktime_to_ns(hrtimer_get_softexpires(timer)) - now), in print_timer()
56 (long long)(ktime_to_ns(hrtimer_get_expires(timer)) - now)); in print_timer()
61 u64 now) in print_active_timers() argument
91 print_timer(m, timer, &tmp, i, now); in print_active_timers()
99 print_base(struct seq_file *m, struct hrtimer_clock_base *base, u64 now) in print_base() argument
112 print_active_timers(m, base, now + ktime_to_ns(base->offset)); in print_base()
115 static void print_cpu(struct seq_file *m, int cpu, u64 now) in print_cpu() argument
123 print_base(m, cpu_base->clock_base + i, now); in print_cpu()
261 timer_list_header(struct seq_file * m,u64 now) timer_list_header() argument
271 u64 now = ktime_to_ns(ktime_get()); sysrq_timer_list_show() local
[all...]
/linux/include/net/
H A Dcodel_impl.h112 codel_time_t now) in codel_should_drop() argument
123 vars->ldelay = now - skb_time_func(skb); in codel_should_drop()
139 vars->first_above_time = now + params->interval; in codel_should_drop()
140 } else if (codel_time_after(now, vars->first_above_time)) { in codel_should_drop()
157 codel_time_t now; in codel_dequeue() local
164 now = codel_get_time(); in codel_dequeue()
166 skb_len_func, skb_time_func, backlog, now); in codel_dequeue()
171 } else if (codel_time_after_eq(now, vars->drop_next)) { in codel_dequeue()
177 * that the next drop should happen now, in codel_dequeue()
181 codel_time_after_eq(now, var in codel_dequeue()
[all...]
/linux/drivers/block/drbd/
H A Ddrbd_debugfs.c96 static void seq_print_one_request(struct seq_file *m, struct drbd_request *req, unsigned long now) in seq_print_one_request() argument
108 seq_printf(m, "\t%d", jiffies_to_msecs(now - req->start_jif)); in seq_print_one_request()
109 seq_print_age_or_dash(m, s & RQ_IN_ACT_LOG, now - req->in_actlog_jif); in seq_print_one_request()
110 seq_print_age_or_dash(m, s & RQ_LOCAL_PENDING, now - req->pre_submit_jif); in seq_print_one_request()
113 seq_print_age_or_dash(m, s & RQ_NET_SENT, now - req->pre_send_jif); in seq_print_one_request()
114 seq_print_age_or_dash(m, (s & RQ_NET_SENT) && !(s & RQ_NET_PENDING), now - req->acked_jif); in seq_print_one_request()
115 seq_print_age_or_dash(m, s & RQ_NET_DONE, now - req->net_done_jif); in seq_print_one_request()
122 static void seq_print_minor_vnr_req(struct seq_file *m, struct drbd_request *req, unsigned long now) in seq_print_minor_vnr_req() argument
125 seq_print_one_request(m, req, now); in seq_print_minor_vnr_req()
128 static void seq_print_resource_pending_meta_io(struct seq_file *m, struct drbd_resource *resource, unsigned long now) in seq_print_resource_pending_meta_io() argument
156 seq_print_waiting_for_AL(struct seq_file * m,struct drbd_resource * resource,unsigned long now) seq_print_waiting_for_AL() argument
191 seq_print_device_bitmap_io(struct seq_file * m,struct drbd_device * device,unsigned long now) seq_print_device_bitmap_io() argument
216 seq_print_resource_pending_bitmap_io(struct seq_file * m,struct drbd_resource * resource,unsigned long now) seq_print_resource_pending_bitmap_io() argument
248 seq_print_peer_request(struct seq_file * m,struct drbd_device * device,struct list_head * lh,unsigned long now) seq_print_peer_request() argument
272 seq_print_device_peer_requests(struct seq_file * m,struct drbd_device * device,unsigned long now) seq_print_device_peer_requests() argument
288 seq_print_resource_pending_peer_requests(struct seq_file * m,struct drbd_resource * resource,unsigned long now) seq_print_resource_pending_peer_requests() argument
303 seq_print_resource_transfer_log_summary(struct seq_file * m,struct drbd_resource * resource,struct drbd_connection * connection,unsigned long now) seq_print_resource_transfer_log_summary() argument
501 seq_print_one_timing_detail(struct seq_file * m,const struct drbd_thread_timing_details * tdp,unsigned long now) seq_print_one_timing_detail() argument
520 seq_print_timing_details(struct seq_file * m,const char * title,unsigned int cb_nr,struct drbd_thread_timing_details * tdp,unsigned long now) seq_print_timing_details() argument
576 unsigned long now = jiffies; connection_oldest_requests_show() local
694 unsigned long now = jiffies; device_oldest_requests_show() local
[all...]
/linux/arch/mips/kernel/
H A Dsync-r4k.c50 uint32_t start, now, prev, end, cur_max_warp = 0; in check_counter_warp() local
64 now = read_c0_count(); in check_counter_warp()
65 last_counter = now; in check_counter_warp()
69 * Be nice every now and then (and also check whether in check_counter_warp()
75 if (now > end || i > 10000000) in check_counter_warp()
81 * Outside the critical section we can now see whether in check_counter_warp()
84 if (unlikely(prev > now)) { in check_counter_warp()
86 max_warp = max(max_warp, prev - now); in check_counter_warp()
99 WARN(!(now-start), in check_counter_warp()
101 now in check_counter_warp()
[all...]
/linux/fs/bcachefs/
H A Dclock.c26 if (time_after_eq64((u64) atomic64_read(&clock->now), timer->expire)) { in bch2_io_timer_add()
114 atomic64_read(&clock->now) < io_until) in bch2_kthread_io_clock_wait()
118 static struct io_timer *get_expired_timer(struct io_clock *clock, u64 now) in get_expired_timer() argument
123 time_after_eq64(now, clock->timers.data[0]->expire)) { in get_expired_timer()
134 u64 now = atomic64_add_return(sectors, &clock->now); in __bch2_increment_clock() local
137 while ((timer = get_expired_timer(clock, now))) in __bch2_increment_clock()
146 u64 now = atomic64_read(&clock->now); in bch2_io_timers_to_text() local
149 prt_printf(out, "current time:\t%llu\n", now); in bch2_io_timers_to_text()
[all...]
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dtime_tai.c37 __u64 ts1, ts2, now; in test_time_tai() local
64 now = ts_to_ns(&now_tai); in test_time_tai()
66 ASSERT_TRUE(now > ts1, "tai_future_ts1"); in test_time_tai()
67 ASSERT_TRUE(now > ts2, "tai_future_ts2"); in test_time_tai()
70 ASSERT_TRUE(now - ts1 < TAI_THRESHOLD, "tai_range_ts1"); in test_time_tai()
71 ASSERT_TRUE(now - ts2 < TAI_THRESHOLD, "tai_range_ts2"); in test_time_tai()
/linux/tools/testing/selftests/powerpc/tm/
H A Dtm-syscall.c79 struct timeval end, now; in tm_syscall() local
89 now.tv_sec = TEST_DURATION; in tm_syscall()
90 now.tv_usec = 0; in tm_syscall()
91 timeradd(&end, &now, &end); in tm_syscall()
93 for (count = 0; timercmp(&now, &end, <); count++) { in tm_syscall()
116 gettimeofday(&now, 0); in tm_syscall()
/linux/tools/testing/selftests/net/
H A Dtimestamping.c138 struct timeval now; in sendpacket() local
142 gettimeofday(&now, 0); in sendpacket()
147 (long)now.tv_sec, (long)now.tv_usec, in sendpacket()
162 struct timeval now; in printpacket() local
164 gettimeofday(&now, 0); in printpacket()
167 (long)now.tv_sec, (long)now.tv_usec, in printpacket()
501 struct timeval now; in main() local
507 gettimeofday(&now, in main()
[all...]

12345678910>>...52