[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1403312134570.14882@ionos.tec.linutronix.de>
Date: Mon, 31 Mar 2014 21:43:13 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Cyrill Gorcunov <gorcunov@...nvz.org>
cc: linux-kernel@...r.kernel.org, shawn@...rchofgit.com,
akpm@...ux-foundation.org, avagin@...nvz.org, xemul@...allels.com
Subject: Re: [rfc 1/2] timerfd: Implement show_fdinfo method
On Mon, 31 Mar 2014, Cyrill Gorcunov wrote:
> For checkpoint/restore of timerfd files we need to know the clock
> type being used on timerfd creation. Thus implement show_fdinfo
> method where we print out the type.
>
> Also to minimize the number of calls print out the ticks as well
> (thus one read of fdinfo entry would eliminate the need of doing
> read() over timerfd itself).
>
> CC: Shawn Landden <shawn@...rchofgit.com>
> CC: Thomas Gleixner <tglx@...utronix.de>
> CC: Andrew Morton <akpm@...ux-foundation.org>
> CC: Andrey Vagin <avagin@...nvz.org>
> CC: Pavel Emelyanov <xemul@...allels.com>
> Signed-off-by: Cyrill Gorcunov <gorcunov@...nvz.org>
> ---
> fs/timerfd.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> Index: linux-2.6.git/fs/timerfd.c
> ===================================================================
> --- linux-2.6.git.orig/fs/timerfd.c
> +++ linux-2.6.git/fs/timerfd.c
> @@ -284,11 +284,20 @@ static ssize_t timerfd_read(struct file
> return res;
> }
>
> +static int timerfd_show(struct seq_file *m, struct file *file)
> +{
> + struct timerfd_ctx *ctx = file->private_data;
> +
> + return seq_printf(m, "clockid: %d ticks: %llu\n",
> + ctx->clockid, (unsigned long long)ctx->ticks);
> +}
And what gives you the flags which were used in timerfd_settime()
along with the remaining time to expiry and the interval?
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists