2014-07-15 21:57:16

by Cyrill Gorcunov

[permalink] [raw]
Subject: [patch 4/4] timerfd.2: Add ioctl method description

ioctl(2)
The following commands are supported: TFD_IOC_SET_TICKS to adjust
the number of the timer expirations that have occurred.
It take a pointer to nonzero 8-byte integer (uint64_t*) containing
new number of expirations. Once the number is set any waiter on
the timer is woken up. The only purpose of this command is to restore
the expirations in a sake of checkpoint/restore procedure.
It requires the kernel to be built with CONFIG_CHECKPOINT_RESTORE
support.

Signed-off-by: Cyrill Gorcunov <[email protected]>
CC: Michael Kerrisk <[email protected]>
CC: Thomas Gleixner <[email protected]>
CC: Andrew Morton <[email protected]>
CC: Andrey Vagin <[email protected]>
CC: Pavel Emelyanov <[email protected]>
CC: Vladimir Davydov <[email protected]>
CC: [email protected]
---
man2/timerfd_create.2 | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Index: man-pages/man2/timerfd_create.2
===================================================================
--- man-pages.orig/man2/timerfd_create.2
+++ man-pages/man2/timerfd_create.2
@@ -260,6 +260,20 @@ multiplexing APIs:
and
.BR epoll (7).
.TP
+.BR ioctl "(2)"
+The following commands are supported:
+.B TFD_IOC_SET_TICKS
+to adjust the number of the timer expirations that have occurred.
+It take a pointer to nonzero 8-byte integer
+.RI ( uint64_t *)
+containing the new number of expirations.
+Once the number is set any waiter on the timer is woken up.
+The only purpose of this command is to restore the expirations
+in a sake of checkpoint/restore procedure.
+It requires the kernel to be built with
+.BR CONFIG_CHECKPOINT_RESTORE
+support.
+.TP
.BR close (2)
When the file descriptor is no longer required it should be closed.
When all file descriptors associated with the same timer object


Subject: Re: [patch 4/4] timerfd.2: Add ioctl method description

Hello Cyrill,

On 07/15/2014 11:54 PM, Cyrill Gorcunov wrote:
> ioctl(2)
> The following commands are supported: TFD_IOC_SET_TICKS to adjust
> the number of the timer expirations that have occurred.
> It take a pointer to nonzero 8-byte integer (uint64_t*) containing
> new number of expirations. Once the number is set any waiter on
> the timer is woken up. The only purpose of this command is to restore
> the expirations in a sake of checkpoint/restore procedure.
> It requires the kernel to be built with CONFIG_CHECKPOINT_RESTORE
> support.

Late... but, patch applied. Thank you.

Cheers,

Michael


> Signed-off-by: Cyrill Gorcunov <[email protected]>
> CC: Michael Kerrisk <[email protected]>
> CC: Thomas Gleixner <[email protected]>
> CC: Andrew Morton <[email protected]>
> CC: Andrey Vagin <[email protected]>
> CC: Pavel Emelyanov <[email protected]>
> CC: Vladimir Davydov <[email protected]>
> CC: [email protected]
> ---
> man2/timerfd_create.2 | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> Index: man-pages/man2/timerfd_create.2
> ===================================================================
> --- man-pages.orig/man2/timerfd_create.2
> +++ man-pages/man2/timerfd_create.2
> @@ -260,6 +260,20 @@ multiplexing APIs:
> and
> .BR epoll (7).
> .TP
> +.BR ioctl "(2)"
> +The following commands are supported:
> +.B TFD_IOC_SET_TICKS
> +to adjust the number of the timer expirations that have occurred.
> +It take a pointer to nonzero 8-byte integer
> +.RI ( uint64_t *)
> +containing the new number of expirations.
> +Once the number is set any waiter on the timer is woken up.
> +The only purpose of this command is to restore the expirations
> +in a sake of checkpoint/restore procedure.
> +It requires the kernel to be built with
> +.BR CONFIG_CHECKPOINT_RESTORE
> +support.
> +.TP
> .BR close (2)
> When the file descriptor is no longer required it should be closed.
> When all file descriptors associated with the same timer object
>
>


--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

2015-04-13 20:10:15

by Cyrill Gorcunov

[permalink] [raw]
Subject: Re: [patch 4/4] timerfd.2: Add ioctl method description

On Mon, Apr 13, 2015 at 09:56:20PM +0200, Michael Kerrisk (man-pages) wrote:
> Hello Cyrill,
>
> On 07/15/2014 11:54 PM, Cyrill Gorcunov wrote:
> > ioctl(2)
> > The following commands are supported: TFD_IOC_SET_TICKS to adjust
> > the number of the timer expirations that have occurred.
> > It take a pointer to nonzero 8-byte integer (uint64_t*) containing
> > new number of expirations. Once the number is set any waiter on
> > the timer is woken up. The only purpose of this command is to restore
> > the expirations in a sake of checkpoint/restore procedure.
> > It requires the kernel to be built with CONFIG_CHECKPOINT_RESTORE
> > support.
>
> Late... but, patch applied. Thank you.

Sure thing! Ping me if anything else should be added.