Re: [PATCHv6 0/7] system time changes notification
From: john stultz
Date: Thu Nov 11 2010 - 18:45:56 EST
On Thu, 2010-11-11 at 18:19 -0500, Kyle Moffett wrote:
> Then consider the possibility of creating "virtual clocksources" which
> are measured against an existing clocksource. They could be
> independently slewed and adjusted relative to the parent clocksource.
> Then the "UTS namespace" feature could also affect the current
> clocksource used for CLOCK_MONOTONIC, etc.
>
> You could perform various forms of time-sensitive software testing
> without causing problems for a "make" process running elsewhere on the
> system. You could test the operation of various kinds of software
> across large jumps or long periods of time (at a highly accelerated
> rate) without impacting your development environment.
Oh, and I forgot, if you want to actually do something like this, the
best way is to create a LD_PRELOAD library that intercepts gettimeofday,
clock_gettime, and all the other syscalls that utilize time values and
adjust them as desired.
This way you only affect the specific application and not the rest of
the system, and avoid all the nasty hardware time domain assumptions
that the kernel makes when working with hardware.
thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/