acrn-kernel/Documentation/core-api
Kurt Kanzenbach 3dc6ffae2d timekeeping: Introduce fast accessor to clock tai
Introduce fast/NMI safe accessor to clock tai for tracing. The Linux kernel
tracing infrastructure has support for using different clocks to generate
timestamps for trace events. Especially in TSN networks it's useful to have TAI
as trace clock, because the application scheduling is done in accordance to the
network time, which is based on TAI. With a tai trace_clock in place, it becomes
very convenient to correlate network activity with Linux kernel application
traces.

Use the same implementation as ktime_get_boot_fast_ns() does by reading the
monotonic time and adding the TAI offset. The same limitations as for the fast
boot implementation apply. The TAI offset may change at run time e.g., by
setting the time or using adjtimex() with an offset. However, these kind of
offset changes are rare events. Nevertheless, the user has to be aware and deal
with it in post processing.

An alternative approach would be to use the same implementation as
ktime_get_real_fast_ns() does. However, this requires to add an additional u64
member to the tk_read_base struct. This struct together with a seqcount is
designed to fit into a single cache line on 64 bit architectures. Adding a new
member would violate this constraint.

Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: https://lore.kernel.org/r/20220414091805.89667-2-kurt@linutronix.de
2022-04-14 16:19:30 +02:00
..
irq
assoc_array.rst
boot-time-mm.rst
bus-virt-phys-mapping.rst
cachetlb.rst
circular-buffers.rst
cpu_hotplug.rst
debug-objects.rst
debugging-via-ohci1394.rst
dma-api-howto.rst
dma-api.rst
dma-attributes.rst Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE"" 2022-03-28 11:37:05 -07:00
dma-isa-lpc.rst
entry.rst Documentation: core-api: entry: Add comments about nesting 2022-01-27 11:32:40 -07:00
errseq.rst
genalloc.rst
generic-radix-tree.rst
genericirq.rst
gfp_mask-from-fs-io.rst
idr.rst
index.rst Documentation: Fill the gaps about entry/noinstr constraints 2022-01-27 11:32:40 -07:00
kernel-api.rst
kobject.rst
kref.rst
librs.rst
local_ops.rst
memory-allocation.rst
memory-hotplug.rst
mm-api.rst mm: document and polish read-ahead code 2022-03-22 15:57:00 -07:00
packing.rst
padata.rst
pin_user_pages.rst mm: Make compound_pincount always available 2022-03-21 12:56:35 -04:00
printk-basics.rst
printk-formats.rst
protection-keys.rst
rbtree.rst
refcount-vs-atomic.rst
symbol-namespaces.rst
this_cpu_ops.rst
timekeeping.rst timekeeping: Introduce fast accessor to clock tai 2022-04-14 16:19:30 +02:00
tracepoint.rst
unaligned-memory-access.rst
workqueue.rst
xarray.rst XArray: Document the locking requirement for the xa_state 2022-02-03 15:56:50 -05:00