Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-11-13 Thread Frederic Weisbecker
On Mon, Sep 28, 2015 at 11:48:16AM -0700, Yunhong Jiang wrote: > Currently, when a new timer added to timer wheel for a nohz_active CPU, > the target CPU will always be waked up. > > In fact, if the new added timer is after the base->next_timer, we don't > need wake up the target CPU since it

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-11-13 Thread Frederic Weisbecker
On Mon, Sep 28, 2015 at 11:48:16AM -0700, Yunhong Jiang wrote: > Currently, when a new timer added to timer wheel for a nohz_active CPU, > the target CPU will always be waked up. > > In fact, if the new added timer is after the base->next_timer, we don't > need wake up the target CPU since it

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-27 Thread Frederic Weisbecker
On Wed, Oct 21, 2015 at 04:16:31PM +0530, Viresh Kumar wrote: > Cc'ing Frederic. > > On 20-10-15, 15:47, Yunhong Jiang wrote: > > On Sun, Oct 11, 2015 at 08:12:39PM +0200, Thomas Gleixner wrote: > > > On Mon, 28 Sep 2015, Yunhong Jiang wrote: > > > > static void internal_add_timer(struct

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-27 Thread Frederic Weisbecker
On Wed, Oct 21, 2015 at 04:16:31PM +0530, Viresh Kumar wrote: > Cc'ing Frederic. > > On 20-10-15, 15:47, Yunhong Jiang wrote: > > On Sun, Oct 11, 2015 at 08:12:39PM +0200, Thomas Gleixner wrote: > > > On Mon, 28 Sep 2015, Yunhong Jiang wrote: > > > > static void internal_add_timer(struct

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-26 Thread Yunhong Jiang
On Sat, Oct 24, 2015 at 08:50:54AM +0530, Viresh Kumar wrote: > On 23-10-15, 15:10, Yunhong Jiang wrote: > > I got this impression from Frederic's comments on > > http://marc.info/?l=linux-kernel=139048415303210=2, "So you simply rely > > on the next tick to see the new timer. This should work

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-26 Thread Yunhong Jiang
On Sat, Oct 24, 2015 at 08:50:54AM +0530, Viresh Kumar wrote: > On 23-10-15, 15:10, Yunhong Jiang wrote: > > I got this impression from Frederic's comments on > > http://marc.info/?l=linux-kernel=139048415303210=2, "So you simply rely > > on the next tick to see the new timer. This should work

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-23 Thread Viresh Kumar
On 23-10-15, 15:10, Yunhong Jiang wrote: > I got this impression from Frederic's comments on > http://marc.info/?l=linux-kernel=139048415303210=2, "So you simply rely > on the next tick to see the new timer. This should work with > CONFIG_NO_HZ_IDLE but not with CONFIG_NO_HZ_FULL since the

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-23 Thread Yunhong Jiang
On Fri, Oct 23, 2015 at 07:49:51AM +0530, Viresh Kumar wrote: > On 22-10-15, 14:40, Yunhong Jiang wrote: > > A naive question is, why it's sure a tick will happen when the tickless > > processor is in idle? > > How do you get this impression? I don't think anyone has said that. Viresh, thanks

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-23 Thread Viresh Kumar
On 23-10-15, 15:10, Yunhong Jiang wrote: > I got this impression from Frederic's comments on > http://marc.info/?l=linux-kernel=139048415303210=2, "So you simply rely > on the next tick to see the new timer. This should work with > CONFIG_NO_HZ_IDLE but not with CONFIG_NO_HZ_FULL since the

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-23 Thread Yunhong Jiang
On Fri, Oct 23, 2015 at 07:49:51AM +0530, Viresh Kumar wrote: > On 22-10-15, 14:40, Yunhong Jiang wrote: > > A naive question is, why it's sure a tick will happen when the tickless > > processor is in idle? > > How do you get this impression? I don't think anyone has said that. Viresh, thanks

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-22 Thread Viresh Kumar
On 22-10-15, 14:40, Yunhong Jiang wrote: > A naive question is, why it's sure a tick will happen when the tickless > processor is in idle? How do you get this impression? I don't think anyone has said that. We are talking about deferrable timers, which by design are only required if the target

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-22 Thread Yunhong Jiang
On Wed, Oct 21, 2015 at 04:16:31PM +0530, Viresh Kumar wrote: > Cc'ing Frederic. > > On 20-10-15, 15:47, Yunhong Jiang wrote: > > On Sun, Oct 11, 2015 at 08:12:39PM +0200, Thomas Gleixner wrote: > > > On Mon, 28 Sep 2015, Yunhong Jiang wrote: > > > > static void internal_add_timer(struct

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-22 Thread Yunhong Jiang
On Wed, Oct 21, 2015 at 04:16:31PM +0530, Viresh Kumar wrote: > Cc'ing Frederic. > > On 20-10-15, 15:47, Yunhong Jiang wrote: > > On Sun, Oct 11, 2015 at 08:12:39PM +0200, Thomas Gleixner wrote: > > > On Mon, 28 Sep 2015, Yunhong Jiang wrote: > > > > static void internal_add_timer(struct

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-22 Thread Viresh Kumar
On 22-10-15, 14:40, Yunhong Jiang wrote: > A naive question is, why it's sure a tick will happen when the tickless > processor is in idle? How do you get this impression? I don't think anyone has said that. We are talking about deferrable timers, which by design are only required if the target

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-21 Thread Viresh Kumar
Cc'ing Frederic. On 20-10-15, 15:47, Yunhong Jiang wrote: > On Sun, Oct 11, 2015 at 08:12:39PM +0200, Thomas Gleixner wrote: > > On Mon, 28 Sep 2015, Yunhong Jiang wrote: > > > static void internal_add_timer(struct tvec_base *base, struct timer_list > > > *timer) > > > { > > > + bool kick_nohz

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-21 Thread Viresh Kumar
Cc'ing Frederic. On 20-10-15, 15:47, Yunhong Jiang wrote: > On Sun, Oct 11, 2015 at 08:12:39PM +0200, Thomas Gleixner wrote: > > On Mon, 28 Sep 2015, Yunhong Jiang wrote: > > > static void internal_add_timer(struct tvec_base *base, struct timer_list > > > *timer) > > > { > > > + bool kick_nohz

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-20 Thread Yunhong Jiang
On Sun, Oct 11, 2015 at 08:12:39PM +0200, Thomas Gleixner wrote: > On Mon, 28 Sep 2015, Yunhong Jiang wrote: > > static void internal_add_timer(struct tvec_base *base, struct timer_list > > *timer) > > { > > + bool kick_nohz = false; > > + > > /* Advance base->jiffies, if the base is

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-20 Thread Yunhong Jiang
On Sun, Oct 11, 2015 at 08:12:39PM +0200, Thomas Gleixner wrote: > On Mon, 28 Sep 2015, Yunhong Jiang wrote: > > static void internal_add_timer(struct tvec_base *base, struct timer_list > > *timer) > > { > > + bool kick_nohz = false; > > + > > /* Advance base->jiffies, if the base is

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-11 Thread Thomas Gleixner
On Mon, 28 Sep 2015, Yunhong Jiang wrote: > static void internal_add_timer(struct tvec_base *base, struct timer_list > *timer) > { > + bool kick_nohz = false; > + > /* Advance base->jiffies, if the base is empty */ > if (!base->all_timers++) > base->timer_jiffies =

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-11 Thread Thomas Gleixner
On Mon, 28 Sep 2015, Yunhong Jiang wrote: > static void internal_add_timer(struct tvec_base *base, struct timer_list > *timer) > { > + bool kick_nohz = false; > + > /* Advance base->jiffies, if the base is empty */ > if (!base->all_timers++) > base->timer_jiffies =

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-05 Thread Yunhong Jiang
Ping for any response. Thanks --jyh On Mon, Sep 28, 2015 at 11:48:16AM -0700, Yunhong Jiang wrote: > Currently, when a new timer added to timer wheel for a nohz_active CPU, > the target CPU will always be waked up. > > In fact, if the new added timer is after the base->next_timer, we don't >

Re: [PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-10-05 Thread Yunhong Jiang
Ping for any response. Thanks --jyh On Mon, Sep 28, 2015 at 11:48:16AM -0700, Yunhong Jiang wrote: > Currently, when a new timer added to timer wheel for a nohz_active CPU, > the target CPU will always be waked up. > > In fact, if the new added timer is after the base->next_timer, we don't >

[PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-09-28 Thread Yunhong Jiang
Currently, when a new timer added to timer wheel for a nohz_active CPU, the target CPU will always be waked up. In fact, if the new added timer is after the base->next_timer, we don't need wake up the target CPU since it will not change the sleep time. A lazy wake up is better in such scenario.

[PATCH] timer: Lazily wakup nohz CPU when adding new timer.

2015-09-28 Thread Yunhong Jiang
Currently, when a new timer added to timer wheel for a nohz_active CPU, the target CPU will always be waked up. In fact, if the new added timer is after the base->next_timer, we don't need wake up the target CPU since it will not change the sleep time. A lazy wake up is better in such scenario.