RE: RFC: better timer interface

2017-05-23 Thread Thomas Gleixner
On Tue, 23 May 2017, David Laight wrote: > From: Thomas Gleixner > > Sent: 23 May 2017 12:59 > > On Tue, 23 May 2017, David Laight wrote: > > > > > From: Thomas Gleixner > > > > Sent: 21 May 2017 19:15 > > > ... > > > > > timer_start(timer, ms, abs) > > > > > > > > I'm not even sure, whether we

RE: RFC: better timer interface

2017-05-23 Thread Thomas Gleixner
On Tue, 23 May 2017, David Laight wrote: > From: Thomas Gleixner > > Sent: 23 May 2017 12:59 > > On Tue, 23 May 2017, David Laight wrote: > > > > > From: Thomas Gleixner > > > > Sent: 21 May 2017 19:15 > > > ... > > > > > timer_start(timer, ms, abs) > > > > > > > > I'm not even sure, whether we

RE: RFC: better timer interface

2017-05-23 Thread David Laight
From: Thomas Gleixner > Sent: 23 May 2017 12:59 > On Tue, 23 May 2017, David Laight wrote: > > > From: Thomas Gleixner > > > Sent: 21 May 2017 19:15 > > ... > > > > timer_start(timer, ms, abs) > > > > > > I'm not even sure, whether we need absolute timer wheel timers at > > > all, because most

RE: RFC: better timer interface

2017-05-23 Thread David Laight
From: Thomas Gleixner > Sent: 23 May 2017 12:59 > On Tue, 23 May 2017, David Laight wrote: > > > From: Thomas Gleixner > > > Sent: 21 May 2017 19:15 > > ... > > > > timer_start(timer, ms, abs) > > > > > > I'm not even sure, whether we need absolute timer wheel timers at > > > all, because most

RE: RFC: better timer interface

2017-05-23 Thread Thomas Gleixner
On Tue, 23 May 2017, David Laight wrote: > From: Thomas Gleixner > > Sent: 21 May 2017 19:15 > ... > > > timer_start(timer, ms, abs) > > > > I'm not even sure, whether we need absolute timer wheel timers at > > all, because most use cases are relative to now. > > Posix requires absolute timers

RE: RFC: better timer interface

2017-05-23 Thread Thomas Gleixner
On Tue, 23 May 2017, David Laight wrote: > From: Thomas Gleixner > > Sent: 21 May 2017 19:15 > ... > > > timer_start(timer, ms, abs) > > > > I'm not even sure, whether we need absolute timer wheel timers at > > all, because most use cases are relative to now. > > Posix requires absolute timers

RE: RFC: better timer interface

2017-05-23 Thread David Laight
From: Thomas Gleixner > Sent: 21 May 2017 19:15 ... > > timer_start(timer, ms, abs) > > I'm not even sure, whether we need absolute timer wheel timers at > all, because most use cases are relative to now. Posix requires absolute timers for some userspace calls (annoying because the code often

RE: RFC: better timer interface

2017-05-23 Thread David Laight
From: Thomas Gleixner > Sent: 21 May 2017 19:15 ... > > timer_start(timer, ms, abs) > > I'm not even sure, whether we need absolute timer wheel timers at > all, because most use cases are relative to now. Posix requires absolute timers for some userspace calls (annoying because the code often

Re: RFC: better timer interface

2017-05-22 Thread Thomas Gleixner
On Mon, 22 May 2017, Arnd Bergmann wrote: > On Sun, May 21, 2017 at 8:14 PM, Thomas Gleixner wrote: > > But it's easy enough to provide them. All we need for that is something > > like > > > > unsigned long time_msec; > > > > which gets incremented every tick by the

Re: RFC: better timer interface

2017-05-22 Thread Thomas Gleixner
On Mon, 22 May 2017, Arnd Bergmann wrote: > On Sun, May 21, 2017 at 8:14 PM, Thomas Gleixner wrote: > > But it's easy enough to provide them. All we need for that is something > > like > > > > unsigned long time_msec; > > > > which gets incremented every tick by the appropriate amount of

Re: RFC: better timer interface

2017-05-22 Thread Thomas Gleixner
On Mon, 22 May 2017, Arnd Bergmann wrote: > On Sun, May 21, 2017 at 7:13 PM, Thomas Gleixner wrote: > I agree, one of the above is good enough, if we do the large-scale API > replacement. Having both ms and sec variants would be for convenience > to avoid having lots of

Re: RFC: better timer interface

2017-05-22 Thread Thomas Gleixner
On Mon, 22 May 2017, Arnd Bergmann wrote: > On Sun, May 21, 2017 at 7:13 PM, Thomas Gleixner wrote: > I agree, one of the above is good enough, if we do the large-scale API > replacement. Having both ms and sec variants would be for convenience > to avoid having lots of open-coded

Re: RFC: better timer interface

2017-05-22 Thread Arnd Bergmann
On Sun, May 21, 2017 at 7:13 PM, Thomas Gleixner wrote: > On Tue, 16 May 2017, Arnd Bergmann wrote: >> On Tue, May 16, 2017 at 5:51 PM, Christoph Hellwig wrote: >> > Yes, that sounds useful to me as well. As you said it's an independent >> > but somewhat related

Re: RFC: better timer interface

2017-05-22 Thread Arnd Bergmann
On Sun, May 21, 2017 at 7:13 PM, Thomas Gleixner wrote: > On Tue, 16 May 2017, Arnd Bergmann wrote: >> On Tue, May 16, 2017 at 5:51 PM, Christoph Hellwig wrote: >> > Yes, that sounds useful to me as well. As you said it's an independent >> > but somewhat related change. I can add it to my

Re: RFC: better timer interface

2017-05-22 Thread Arnd Bergmann
On Sun, May 21, 2017 at 8:14 PM, Thomas Gleixner wrote: > On Sun, 21 May 2017, Thomas Gleixner wrote: >> On Tue, 16 May 2017, Arnd Bergmann wrote: >> > On Tue, May 16, 2017 at 5:51 PM, Christoph Hellwig wrote: >> > > Yes, that sounds useful to me as well. As you

Re: RFC: better timer interface

2017-05-22 Thread Arnd Bergmann
On Sun, May 21, 2017 at 8:14 PM, Thomas Gleixner wrote: > On Sun, 21 May 2017, Thomas Gleixner wrote: >> On Tue, 16 May 2017, Arnd Bergmann wrote: >> > On Tue, May 16, 2017 at 5:51 PM, Christoph Hellwig wrote: >> > > Yes, that sounds useful to me as well. As you said it's an independent >> > >

Re: RFC: better timer interface

2017-05-21 Thread Thomas Gleixner
On Sun, 21 May 2017, Thomas Gleixner wrote: > On Tue, 16 May 2017, Arnd Bergmann wrote: > > On Tue, May 16, 2017 at 5:51 PM, Christoph Hellwig wrote: > > > Yes, that sounds useful to me as well. As you said it's an independent > > > but somewhat related change. I can add it to my

Re: RFC: better timer interface

2017-05-21 Thread Thomas Gleixner
On Sun, 21 May 2017, Thomas Gleixner wrote: > On Tue, 16 May 2017, Arnd Bergmann wrote: > > On Tue, May 16, 2017 at 5:51 PM, Christoph Hellwig wrote: > > > Yes, that sounds useful to me as well. As you said it's an independent > > > but somewhat related change. I can add it to my series, but

Re: RFC: better timer interface

2017-05-21 Thread Thomas Gleixner
On Tue, 16 May 2017, Arnd Bergmann wrote: > On Tue, May 16, 2017 at 5:51 PM, Christoph Hellwig wrote: > > Yes, that sounds useful to me as well. As you said it's an independent > > but somewhat related change. I can add it to my series, but I'll > > need a suggestions for a good

Re: RFC: better timer interface

2017-05-21 Thread Thomas Gleixner
On Tue, 16 May 2017, Arnd Bergmann wrote: > On Tue, May 16, 2017 at 5:51 PM, Christoph Hellwig wrote: > > Yes, that sounds useful to me as well. As you said it's an independent > > but somewhat related change. I can add it to my series, but I'll > > need a suggestions for a good and short name.

Re: RFC: better timer interface

2017-05-18 Thread Christoph Hellwig
On Tue, May 16, 2017 at 10:26:39PM +0200, Arnd Bergmann wrote: > If we keep the unusual *_timer() naming (rather than timer_*() as hrtimer > has), we could use one of > > a) start_timer(struct timer_list *timer, unsigned long ms); > b) restart_timer(struct timer_list *timer, unsigned long ms); >

Re: RFC: better timer interface

2017-05-18 Thread Christoph Hellwig
On Tue, May 16, 2017 at 10:26:39PM +0200, Arnd Bergmann wrote: > If we keep the unusual *_timer() naming (rather than timer_*() as hrtimer > has), we could use one of > > a) start_timer(struct timer_list *timer, unsigned long ms); > b) restart_timer(struct timer_list *timer, unsigned long ms); >

Re: RFC: better timer interface

2017-05-16 Thread Arnd Bergmann
On Tue, May 16, 2017 at 5:51 PM, Christoph Hellwig wrote: > On Tue, May 16, 2017 at 05:45:07PM +0200, Arnd Bergmann wrote: >> This looks really nice, but what is the long-term plan for the interface? >> Do you expect that we will eventually change all 700+ users of timer_list >> to

Re: RFC: better timer interface

2017-05-16 Thread Arnd Bergmann
On Tue, May 16, 2017 at 5:51 PM, Christoph Hellwig wrote: > On Tue, May 16, 2017 at 05:45:07PM +0200, Arnd Bergmann wrote: >> This looks really nice, but what is the long-term plan for the interface? >> Do you expect that we will eventually change all 700+ users of timer_list >> to the new type,

Re: RFC: better timer interface

2017-05-16 Thread Christoph Hellwig
On Tue, May 16, 2017 at 05:45:07PM +0200, Arnd Bergmann wrote: > This looks really nice, but what is the long-term plan for the interface? > Do you expect that we will eventually change all 700+ users of timer_list > to the new type, or do we keep both variants around indefinitely to avoid >

Re: RFC: better timer interface

2017-05-16 Thread Christoph Hellwig
On Tue, May 16, 2017 at 05:45:07PM +0200, Arnd Bergmann wrote: > This looks really nice, but what is the long-term plan for the interface? > Do you expect that we will eventually change all 700+ users of timer_list > to the new type, or do we keep both variants around indefinitely to avoid >

Re: RFC: better timer interface

2017-05-16 Thread Arnd Bergmann
On Tue, May 16, 2017 at 1:48 PM, Christoph Hellwig wrote: > Hi all, > > this series attempts to provide a "modern" timer interface where the > callback gets the timer_list structure as an argument so that it > can use container_of instead of having to cast to/from unsigned long > all

Re: RFC: better timer interface

2017-05-16 Thread Arnd Bergmann
On Tue, May 16, 2017 at 1:48 PM, Christoph Hellwig wrote: > Hi all, > > this series attempts to provide a "modern" timer interface where the > callback gets the timer_list structure as an argument so that it > can use container_of instead of having to cast to/from unsigned long > all the time (or

RFC: better timer interface

2017-05-16 Thread Christoph Hellwig
Hi all, this series attempts to provide a "modern" timer interface where the callback gets the timer_list structure as an argument so that it can use container_of instead of having to cast to/from unsigned long all the time (or even worse use function pointer casts, we have quite a few of those

RFC: better timer interface

2017-05-16 Thread Christoph Hellwig
Hi all, this series attempts to provide a "modern" timer interface where the callback gets the timer_list structure as an argument so that it can use container_of instead of having to cast to/from unsigned long all the time (or even worse use function pointer casts, we have quite a few of those