[Devel] Re: [PATCH] [RFC] checkpoint/restart timerfd
Matt Helsley
matthltc at us.ibm.com
Sun Nov 15 20:04:03 PST 2009
On Fri, Nov 13, 2009 at 04:49:35PM -0800, Matt Helsley wrote:
> Support checkpoint/restart of timers specified via timerfd. Checkpoint
> essentially does the timerfd_gettime() syscall and saves the expired flags
> and tick count. This ensures there will be no lost expirations/ticks
> between checkpoint restart.
>
> This should largely work as expected since the time returned from gettime
> is always relative.
>
> However, like any time-sensitive state, timerfds set with TFD_TIMER_ABSTIME
> may expire/tick at the "wrong time" because that time has long since passed.
> Short of introducing time namespaces there's almost nothing that can be done
> to checkpoint these uses of timerfd. Would it make more sense to mark timerfds
> which were (re)set with TFD_TIMER_ABSTIME and refuse to checkpoint them rather
> than deliver a "best-effort" expiration/tick?
>
> Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
> --
> NOTE: Compiles, untested.
> ---
> fs/timerfd.c | 113 ++++++++++++++++++++++++++++++++++++----
Argh. Missed the "restore" path which requires installing a handler for
these files in checkpoint/file.c. Fixed.
I also switched to __s64 values to keep the times in nanoseconds rather
than a timespec analog. This makes it more similar to the code in
checkpoint/signal.c (found this when looking for pieces to share in the
itimer checkpoint code).
Cheers,
-Matt Helsley
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list