Re: [patch 1/3] timerfd: Implement show_fdinfo method

2014-05-21 Thread Cyrill Gorcunov
On Thu, May 22, 2014 at 06:41:57AM +0900, Thomas Gleixner wrote: > > Shouldn't this depend on CONFIG_PROCFS? > > > static const struct file_operations timerfd_fops = { > > .release= timerfd_release, > > .poll = timerfd_poll, > > .read = timerfd_read, > >

Re: [patch 1/3] timerfd: Implement show_fdinfo method

2014-05-21 Thread Thomas Gleixner
On Tue, 29 Apr 2014, Cyrill Gorcunov wrote: > > +static int timerfd_show(struct seq_file *m, struct file *file) > +{ > + struct timerfd_ctx *ctx = file->private_data; > + struct itimerspec t; > + > + spin_lock_irq(&ctx->wqh.lock); > + t.it_value = ktime_to_timespec(timerfd_get_rem

[patch 1/3] timerfd: Implement show_fdinfo method

2014-04-28 Thread Cyrill Gorcunov
For checkpoint/restore of timerfd files we need to know how exactly the timer were armed to be able to handle it. Thus implement show_fdinfo method which provides enough information for timer re-creation. One of significant changes I think is addition of timerfd_ctx::settime_flags member. Currentl

Re: [patch 1/3] timerfd: Implement show_fdinfo method

2014-04-08 Thread Cyrill Gorcunov
On Tue, Apr 08, 2014 at 10:54:45AM +0400, Vladimir Davydov wrote: > > Hi Vladimir! Well it_value returns remaining time so it's up to user to > > adjust this value when restore with abs time. That said one can examinate > > if abs flag was set and restore accordingly. If this is vague I'm open > >

Re: [patch 1/3] timerfd: Implement show_fdinfo method

2014-04-07 Thread Vladimir Davydov
On 04/08/2014 10:42 AM, Cyrill Gorcunov wrote: > On Tue, Apr 08, 2014 at 10:17:14AM +0400, Vladimir Davydov wrote: > ... >>> +static int timerfd_show(struct seq_file *m, struct file *file) >>> +{ >>> + struct timerfd_ctx *ctx = file->private_data; >>> + struct itimerspec t; >>> + >>> + spin_l

Re: [patch 1/3] timerfd: Implement show_fdinfo method

2014-04-07 Thread Cyrill Gorcunov
On Tue, Apr 08, 2014 at 10:17:14AM +0400, Vladimir Davydov wrote: ... > > +static int timerfd_show(struct seq_file *m, struct file *file) > > +{ > > + struct timerfd_ctx *ctx = file->private_data; > > + struct itimerspec t; > > + > > + spin_lock_irq(&ctx->wqh.lock); > > + t.it_value = ktime

Re: [patch 1/3] timerfd: Implement show_fdinfo method

2014-04-07 Thread Vladimir Davydov
Hi Cyrill, On 04/07/2014 09:47 PM, Cyrill Gorcunov wrote: > For checkpoint/restore of timerfd files we need to know how exactly > the timer were armed to be able to handle it. Thus implement show_fdinfo > method which provides enough information for timer re-creation. > > One of significant change

[patch 1/3] timerfd: Implement show_fdinfo method

2014-04-07 Thread Cyrill Gorcunov
For checkpoint/restore of timerfd files we need to know how exactly the timer were armed to be able to handle it. Thus implement show_fdinfo method which provides enough information for timer re-creation. One of significant changes I think is addition of timerfd_ctx::settime_flags member. Currentl