Question about ktime_get_mono_fast_ns() non-monotonic behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey everyone,

I have a question about ktime_get_mono_fast_ns(), which is used by the
BPF helper bpf_ktime_get_ns() among other use cases. The comment above
this function specifies that there are cases where the observed clock
would not be monotonic.

I had 2 beginner questions:

1) Is there a (rough) bound as to how much the clock can go backwards?
My understanding is that it is bounded by (slope update * delta), but
I don't know what's the bound of either of those (if any).

2) The comment specifies that for a single cpu, the only way for this
behavior to happen is when observing the time in the context of an NMI
that happens during an update.
For observations across different cpus, are the scenarios where the
non-monotonic behavior happens also tied to observing time within NMI
contexts? or is it something that can happen outside of NMI contexts
as well?

Thanks in advance! (and please excuse any dumb/obvious questions :) )



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux