now_ns
s64 now_ns, periods;
now_ns = ktime_to_ns(now);
delta = now_ns + vcpu->arch.count_dyn_bias;
periods = div64_s64(now_ns, vcpu->arch.count_period);
delta = now_ns + vcpu->arch.count_dyn_bias;
static void bfq_update_io_intensity(struct bfq_queue *bfqq, u64 now_ns)
u64 tot_io_time = now_ns - bfqq->io_start_time;
now_ns - bfqq->ttime.last_end_request;
bfqq->io_start_time = now_ns - (tot_io_time>>1);
u64 now_ns)
now_ns - bfqd->last_completion >= 4 * NSEC_PER_MSEC ||
now_ns > bfqq->waker_detection_started +
bfqq->waker_detection_started = now_ns;
u64 now_ns = blk_time_get_ns();
bfq_check_waker(bfqd, bfqq, now_ns);
bfq_update_io_intensity(bfqq, now_ns);
u64 now_ns = blk_time_get_ns();
if (now_ns - bfqd->last_dispatch > 100*NSEC_PER_MSEC &&
now_ns - bfqd->last_completion < BFQ_MIN_TT)
bfqd->delta_from_first = now_ns - bfqd->first_dispatch;
bfqd->last_dispatch = now_ns;
u64 now_ns = blk_time_get_ns();
bfqq->ttime.last_end_request = now_ns + 1;
bfqq->io_start_time = now_ns;
u64 now_ns;
now_ns = blk_time_get_ns();
bfqq->ttime.last_end_request = now_ns;
delta_us = div_u64(now_ns - bfqd->last_completion, NSEC_PER_USEC);
bfqd->last_completion = now_ns;
now->now_ns = blk_time_get_ns();
now->now = ktime_to_us(now->now_ns);
expires = now->now_ns +
u64 now_ns;
u64 now_ns;
now_ns = blk_time_get_ns();
ioc->autop_too_fast_at = now_ns;
if (now_ns - ioc->autop_too_fast_at >= AUTOP_CYCLE_NSEC)
ioc->autop_too_slow_at = now_ns;
if (now_ns - ioc->autop_too_slow_at >= AUTOP_CYCLE_NSEC)
s64 now_ns, first_ns, period_ns, next_ns;
now_ns = timespec64_to_ns(&now);
if (first_ns < now_ns) {
count = div_u64(now_ns - first_ns, period_ns);
while (next_ns < now_ns + 100000000)
s64 offset_ns, now_ns;
now_ns = timespec64_to_ns(ts);
(void)ns2counters(idtfc3, offset_ns + now_ns, &sub_ns);
return idtfc3_timecounter_update(idtfc3, counter, now_ns);
s64 now_ns;
now_ns = timespec64_to_ns(&ts);
now_ns += delta_ns + idt82p33->tod_write_overhead_ns;
ts = ns_to_timespec64(now_ns);
struct task_struct *tsk, u64 now_ns)
delta = now_ns - tsk->start_time;
u64 now_ns;
now_ns = ktime_get_ns();
tgid_stats_add_task(stats, tsk, now_ns);
u64 now_ns;
now_ns = ktime_get_ns();
tgid_stats_add_task(tsk->signal->stats, tsk, now_ns);
u64 now_ns, delta;
now_ns = ktime_get_ns();
delta = now_ns - tsk->group_leader->start_time;
delta = now_ns - tsk->start_time;
u64 now_ns, edt_ns, interval_us;
now_ns = tp->tcp_clock_cache;
edt_ns = max(tp->tcp_wstamp_ns, now_ns);
interval_us = div_u64(edt_ns - now_ns, NSEC_PER_USEC);
__u64 now_ns, pkt_ns;
now_ns = now_ts.tv_sec * NSEC_PER_SEC + now_ts.tv_nsec;
if (ASSERT_GE(now_ns, pkt_ns, "check rcv tstamp"))
ASSERT_LT(now_ns - pkt_ns, 5 * NSEC_PER_SEC,
__u64 now_ns;
now_ns = now_ts.tv_sec * NSEC_PER_SEC + now_ts.tv_nsec;
cmsg->cmsg_len = CMSG_LEN(sizeof(now_ns));
*(__u64 *)CMSG_DATA(cmsg) = now_ns;
uint64_t t0 = now_ns();
uint64_t dt = now_ns() - t0;