Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-08-01 Thread Thomas Gleixner
On Wed, 1 Aug 2018, Xu YiPing wrote: > On 2018/7/31 22:34, Thomas Gleixner wrote: > > > > > > On Tue, 31 Jul 2018, Thomas Gleixner wrote: > > > >> On Tue, 31 Jul 2018, Xu YiPing wrote: > >>> On 2018/7/30 19:03, Thomas Gleixner wrote: > > __internal_add_timer(base, timer) > { >

Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-08-01 Thread Thomas Gleixner
On Wed, 1 Aug 2018, Xu YiPing wrote: > On 2018/7/31 22:34, Thomas Gleixner wrote: > > > > > > On Tue, 31 Jul 2018, Thomas Gleixner wrote: > > > >> On Tue, 31 Jul 2018, Xu YiPing wrote: > >>> On 2018/7/30 19:03, Thomas Gleixner wrote: > > __internal_add_timer(base, timer) > { >

Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-31 Thread Xu YiPing
On 2018/7/31 22:34, Thomas Gleixner wrote: > > > On Tue, 31 Jul 2018, Thomas Gleixner wrote: > >> On Tue, 31 Jul 2018, Xu YiPing wrote: >>> On 2018/7/30 19:03, Thomas Gleixner wrote: __internal_add_timer(base, timer) { idx = calc_wheel_index(1, 1) {

Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-31 Thread Xu YiPing
On 2018/7/31 22:34, Thomas Gleixner wrote: > > > On Tue, 31 Jul 2018, Thomas Gleixner wrote: > >> On Tue, 31 Jul 2018, Xu YiPing wrote: >>> On 2018/7/30 19:03, Thomas Gleixner wrote: __internal_add_timer(base, timer) { idx = calc_wheel_index(1, 1) {

Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-31 Thread Thomas Gleixner
On Tue, 31 Jul 2018, Thomas Gleixner wrote: > On Tue, 31 Jul 2018, Xu YiPing wrote: > > On 2018/7/30 19:03, Thomas Gleixner wrote: > > > > > > __internal_add_timer(base, timer) > > > { > > >idx = calc_wheel_index(1, 1) > > >{ > > >delta = 1 - 1; <- 0 > > > > > >

Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-31 Thread Thomas Gleixner
On Tue, 31 Jul 2018, Thomas Gleixner wrote: > On Tue, 31 Jul 2018, Xu YiPing wrote: > > On 2018/7/30 19:03, Thomas Gleixner wrote: > > > > > > __internal_add_timer(base, timer) > > > { > > >idx = calc_wheel_index(1, 1) > > >{ > > >delta = 1 - 1; <- 0 > > > > > >

Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-31 Thread Thomas Gleixner
On Tue, 31 Jul 2018, Xu YiPing wrote: > On 2018/7/30 19:03, Thomas Gleixner wrote: > > > > __internal_add_timer(base, timer) > > { > >idx = calc_wheel_index(1, 1) > >{ > >delta = 1 - 1; <- 0 > > > >if (0 < LVL_START(1)) > >idx =

Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-31 Thread Thomas Gleixner
On Tue, 31 Jul 2018, Xu YiPing wrote: > On 2018/7/30 19:03, Thomas Gleixner wrote: > > > > __internal_add_timer(base, timer) > > { > >idx = calc_wheel_index(1, 1) > >{ > >delta = 1 - 1; <- 0 > > > >if (0 < LVL_START(1)) > >idx =

Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-31 Thread Xu YiPing
On 2018/7/30 19:03, Thomas Gleixner wrote: > On Fri, 27 Jul 2018, Xu YiPing wrote: > >> when the expires of timer is align with LVL_GRAN(n), it will be trigged >> in 'expires + LVL_GRAN(n)'. >> >> Some drivers like power runtime use the timer to start a power down >> of device, it could saves

Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-31 Thread Xu YiPing
On 2018/7/30 19:03, Thomas Gleixner wrote: > On Fri, 27 Jul 2018, Xu YiPing wrote: > >> when the expires of timer is align with LVL_GRAN(n), it will be trigged >> in 'expires + LVL_GRAN(n)'. >> >> Some drivers like power runtime use the timer to start a power down >> of device, it could saves

Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-31 Thread Xu YiPing
On 2018/7/30 19:03, Thomas Gleixner wrote: > On Fri, 27 Jul 2018, Xu YiPing wrote: > >> when the expires of timer is align with LVL_GRAN(n), it will be trigged >> in 'expires + LVL_GRAN(n)'. >> >> Some drivers like power runtime use the timer to start a power down >> of device, it could saves

Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-31 Thread Xu YiPing
On 2018/7/30 19:03, Thomas Gleixner wrote: > On Fri, 27 Jul 2018, Xu YiPing wrote: > >> when the expires of timer is align with LVL_GRAN(n), it will be trigged >> in 'expires + LVL_GRAN(n)'. >> >> Some drivers like power runtime use the timer to start a power down >> of device, it could saves

Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-30 Thread Thomas Gleixner
On Fri, 27 Jul 2018, Xu YiPing wrote: > when the expires of timer is align with LVL_GRAN(n), it will be trigged > in 'expires + LVL_GRAN(n)'. > > Some drivers like power runtime use the timer to start a power down > of device, it could saves power if the timer is triggerd in time, > especially

Re: [PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-30 Thread Thomas Gleixner
On Fri, 27 Jul 2018, Xu YiPing wrote: > when the expires of timer is align with LVL_GRAN(n), it will be trigged > in 'expires + LVL_GRAN(n)'. > > Some drivers like power runtime use the timer to start a power down > of device, it could saves power if the timer is triggerd in time, > especially

[PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-26 Thread Xu YiPing
when the expires of timer is align with LVL_GRAN(n), it will be trigged in 'expires + LVL_GRAN(n)'. Some drivers like power runtime use the timer to start a power down of device, it could saves power if the timer is triggerd in time, especially when LEVEL=0 with low expires. Signed-off-by: Xu

[PATCH] timers: fix offset calculation when the expires align with LVL_GRAN

2018-07-26 Thread Xu YiPing
when the expires of timer is align with LVL_GRAN(n), it will be trigged in 'expires + LVL_GRAN(n)'. Some drivers like power runtime use the timer to start a power down of device, it could saves power if the timer is triggerd in time, especially when LEVEL=0 with low expires. Signed-off-by: Xu