Difference between revisions of "Time namespace"

From CRIU
Jump to navigation Jump to search
m
(remove TODO, add LWN link)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Two things (for now) we want to solve with this:
+
The time namespace support has been merged in the 5.6 kernel. The current implementation allows setting per-namespace offsets to the system monotonic and boot-time clocks.
# Shift timer's offsets
 
# Make start-time remain "unchanged" after C/R
 
# Continuous flow of monotonic time (CLOCK_MONOTONIC).
 
  
What about other kinds of counters like perf events and trace events?
+
[https://github.com/checkpoint-restore/criu/pull/1002 The time namespace support] in CRIU has been merged in the [[Download/criu/3.14 | 3.14 release]].
  
=TODO=
+
[https://lwn.net/Articles/766089/ LWN article about time namespaces]
==Required in RFC==
 
 
 
* selftests to test all we've added
 
* TIME_NS iffdefery everywhere
 
 
 
==Maybe later==
 
* CLONE_NEWTIME reuses the last free flag from sys_clone() - any way to still keep extensibility for the syscall?
 
* arm64/arm32/s390/power64 - add archs vvar support (nit: big/little-endianess for timespec::nsec)
 
* REALTIME-related:
 
** REALTIME offsets
 
** vvar offsets will need synchronization (like gtod_read_begin()/gtod_read_retry())
 
** vfs modification/creation time should work
 
** starttime in /proc/pid/stat
 
** btime in /proc/stat
 
** utime()/utimes()/futimesat() (with times == NULL)
 
** utimensat()/futimens() - with UTIME_NOW
 
** mq_timedsend()/mq_timedreceive()
 
** semtimedop()
 
** timerfd
 
** timer_create()
 
** COARSE times
 
** clock_nanosleep()
 
* Adjtime (too complicated for PoC)
 
* Cpu time for thread/pid/pgid (times())
 
* /proc/stat ticks? (top uses them e.g.)
 
* pid creation time (probably different unrelated API)
 
* clock_tai - if we care about isolation from host's time
 
 
 
=Git=
 
* [https://github.com/0x7f454c46/linux/tree/wip/time-ns https://github.com/0x7f454c46/linux/tree/wip/time-ns]
 
  
 
=Links=
 
=Links=
 +
* [https://lwn.net/Articles/817650/ 04/2020 <nowiki>[PATCH v3 0/6] arm64: add the time namespace support</nowiki>]
 +
* [https://lore.kernel.org/lkml/158016896588.31887.14143226032971732742.tglx@nanos.tec.linutronix.de/ 01/2020<nowiki> [GIT pull] timers/core for 5.6-rc1</nowiki>]
 +
* [https://lkml.kernel.org/r/20191112012724.250792-1-dima@arista.com 11/2019 PATCHv8 00/34 kernel: Introduce Time Namespace]
 
* [https://lkml.kernel.org/r/20190206001107.16488-1-dima@arista.com 02/2019 PATCH 00/32 kernel: Introduce Time Namespace]
 
* [https://lkml.kernel.org/r/20190206001107.16488-1-dima@arista.com 02/2019 PATCH 00/32 kernel: Introduce Time Namespace]
 
* [https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2018-November/006210.html 11/2018 <nowiki>[Ksummit-discuss] [TECH-TOPIC] Multiple time domains</nowiki>]
 
* [https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2018-November/006210.html 11/2018 <nowiki>[Ksummit-discuss] [TECH-TOPIC] Multiple time domains</nowiki>]

Latest revision as of 14:53, 29 April 2020