Re: [PATCH 03/32] timens: Introduce CLOCK_MONOTONIC offsets

2019-02-08 Thread Thomas Gleixner
On Thu, 7 Feb 2019, Thomas Gleixner wrote: > Does this really need to be an out of line call? If you stick this into the > clock_get() implementations then it boils down to: > > static inline void timens_add_monotonic(struct timespec64 *ts) > { > struct timens_offsets *ns_offsets = current->

Re: [PATCH 03/32] timens: Introduce CLOCK_MONOTONIC offsets

2019-02-08 Thread Andrei Vagin
On Thu, Feb 07, 2019 at 10:40:55PM +0100, Thomas Gleixner wrote: > On Wed, 6 Feb 2019, Dmitry Safonov wrote: > > #include "timekeeping.h" > > #include "posix-timers.h" > > @@ -1041,6 +1042,9 @@ SYSCALL_DEFINE2(clock_gettime, const clockid_t, > > which_clock, > > > > error = kc->clock_get(w

Re: [PATCH 03/32] timens: Introduce CLOCK_MONOTONIC offsets

2019-02-07 Thread Thomas Gleixner
On Wed, 6 Feb 2019, Dmitry Safonov wrote: > #include "timekeeping.h" > #include "posix-timers.h" > @@ -1041,6 +1042,9 @@ SYSCALL_DEFINE2(clock_gettime, const clockid_t, > which_clock, > > error = kc->clock_get(which_clock, &kernel_tp); > > + if (!error && kc->clock_timens_adjust) >

[PATCH 03/32] timens: Introduce CLOCK_MONOTONIC offsets

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin Add monotonic time virtualisation for time namespace. Introduce timespec for monotionic clock into timens offsets and wire clock_gettime() syscall. Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- include/linux/time_namespace.h