Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-21 Thread Tony Lindgren
* Rafael J. Wysocki [691231 23:00]: > From: Rafael J. Wysocki > > If the tick has been stopped already, but the governor has not asked to > stop it (which it can do sometimes), the idle loop should invoke > tick_nohz_idle_stop_tick(), to let tick_nohz_stop_tick() take care > of this case

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-21 Thread Tony Lindgren
* Rafael J. Wysocki [691231 23:00]: > From: Rafael J. Wysocki > > If the tick has been stopped already, but the governor has not asked to > stop it (which it can do sometimes), the idle loop should invoke > tick_nohz_idle_stop_tick(), to let tick_nohz_stop_tick() take care > of this case

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-20 Thread Rafael J. Wysocki
On Mon, Aug 20, 2018 at 4:42 PM Frederic Weisbecker wrote: > > On Sat, Aug 18, 2018 at 11:57:00PM +0200, Rafael J. Wysocki wrote: > > On Fri, Aug 17, 2018 at 4:12 PM Frederic Weisbecker > > wrote: [cut] > > > > Now, in general, there are two reasons for the idle governor (whatever > > it is)

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-20 Thread Rafael J. Wysocki
On Mon, Aug 20, 2018 at 4:42 PM Frederic Weisbecker wrote: > > On Sat, Aug 18, 2018 at 11:57:00PM +0200, Rafael J. Wysocki wrote: > > On Fri, Aug 17, 2018 at 4:12 PM Frederic Weisbecker > > wrote: [cut] > > > > Now, in general, there are two reasons for the idle governor (whatever > > it is)

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-20 Thread Frederic Weisbecker
On Sat, Aug 18, 2018 at 11:57:00PM +0200, Rafael J. Wysocki wrote: > On Fri, Aug 17, 2018 at 4:12 PM Frederic Weisbecker > wrote: > > > > On Fri, Aug 17, 2018 at 11:32:07AM +0200, Rafael J. Wysocki wrote: > > > On Thursday, August 16, 2018 3:27:24 PM CEST Frederic Weisbecker wrote: > > > > On

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-20 Thread Frederic Weisbecker
On Sat, Aug 18, 2018 at 11:57:00PM +0200, Rafael J. Wysocki wrote: > On Fri, Aug 17, 2018 at 4:12 PM Frederic Weisbecker > wrote: > > > > On Fri, Aug 17, 2018 at 11:32:07AM +0200, Rafael J. Wysocki wrote: > > > On Thursday, August 16, 2018 3:27:24 PM CEST Frederic Weisbecker wrote: > > > > On

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-20 Thread Peter Zijlstra
On Sat, Aug 18, 2018 at 11:57:00PM +0200, Rafael J. Wysocki wrote: > So I have given more consideration to this and my conclusion is that > restarting the tick between cpuidle_select() and call_cpuidle() is a > bad idea. Ack, we should only restart the tick once we leave the idle loop. > First

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-20 Thread Peter Zijlstra
On Sat, Aug 18, 2018 at 11:57:00PM +0200, Rafael J. Wysocki wrote: > So I have given more consideration to this and my conclusion is that > restarting the tick between cpuidle_select() and call_cpuidle() is a > bad idea. Ack, we should only restart the tick once we leave the idle loop. > First

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-19 Thread Rafael J. Wysocki
On Sun, Aug 19, 2018 at 2:36 AM wrote: > > On Sat, Aug 18, 2018 at 11:57:00PM +0200, Rafael J. Wysocki wrote: > > [...] > > > > > > Otherwise we can have something like this: > > > > > > > > > > diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c > > > > > index da9455a..408c985

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-19 Thread Rafael J. Wysocki
On Sun, Aug 19, 2018 at 2:36 AM wrote: > > On Sat, Aug 18, 2018 at 11:57:00PM +0200, Rafael J. Wysocki wrote: > > [...] > > > > > > Otherwise we can have something like this: > > > > > > > > > > diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c > > > > > index da9455a..408c985

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-18 Thread leo . yan
On Sat, Aug 18, 2018 at 11:57:00PM +0200, Rafael J. Wysocki wrote: [...] > > > > Otherwise we can have something like this: > > > > > > > > diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c > > > > index da9455a..408c985 100644 > > > > --- a/kernel/time/tick-sched.c > > > > +++

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-18 Thread leo . yan
On Sat, Aug 18, 2018 at 11:57:00PM +0200, Rafael J. Wysocki wrote: [...] > > > > Otherwise we can have something like this: > > > > > > > > diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c > > > > index da9455a..408c985 100644 > > > > --- a/kernel/time/tick-sched.c > > > > +++

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-18 Thread Rafael J. Wysocki
On Fri, Aug 17, 2018 at 4:12 PM Frederic Weisbecker wrote: > > On Fri, Aug 17, 2018 at 11:32:07AM +0200, Rafael J. Wysocki wrote: > > On Thursday, August 16, 2018 3:27:24 PM CEST Frederic Weisbecker wrote: > > > On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J. Wysocki wrote: > > > > From:

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-18 Thread Rafael J. Wysocki
On Fri, Aug 17, 2018 at 4:12 PM Frederic Weisbecker wrote: > > On Fri, Aug 17, 2018 at 11:32:07AM +0200, Rafael J. Wysocki wrote: > > On Thursday, August 16, 2018 3:27:24 PM CEST Frederic Weisbecker wrote: > > > On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J. Wysocki wrote: > > > > From:

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-17 Thread Frederic Weisbecker
On Fri, Aug 17, 2018 at 11:32:07AM +0200, Rafael J. Wysocki wrote: > On Thursday, August 16, 2018 3:27:24 PM CEST Frederic Weisbecker wrote: > > On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki > > > > > > If the tick has been stopped already, but

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-17 Thread Frederic Weisbecker
On Fri, Aug 17, 2018 at 11:32:07AM +0200, Rafael J. Wysocki wrote: > On Thursday, August 16, 2018 3:27:24 PM CEST Frederic Weisbecker wrote: > > On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki > > > > > > If the tick has been stopped already, but

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-17 Thread Rafael J. Wysocki
On Fri, Aug 17, 2018 at 11:34 AM Rafael J. Wysocki wrote: > > On Thursday, August 16, 2018 3:27:24 PM CEST Frederic Weisbecker wrote: > > On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki > > > > > > If the tick has been stopped already, but the

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-17 Thread Rafael J. Wysocki
On Fri, Aug 17, 2018 at 11:34 AM Rafael J. Wysocki wrote: > > On Thursday, August 16, 2018 3:27:24 PM CEST Frederic Weisbecker wrote: > > On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki > > > > > > If the tick has been stopped already, but the

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-17 Thread Rafael J. Wysocki
On Thursday, August 16, 2018 3:27:24 PM CEST Frederic Weisbecker wrote: > On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > If the tick has been stopped already, but the governor has not asked to > > stop it (which it can do sometimes), the

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-17 Thread Rafael J. Wysocki
On Thursday, August 16, 2018 3:27:24 PM CEST Frederic Weisbecker wrote: > On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > If the tick has been stopped already, but the governor has not asked to > > stop it (which it can do sometimes), the

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-16 Thread Frederic Weisbecker
On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If the tick has been stopped already, but the governor has not asked to > stop it (which it can do sometimes), the idle loop should invoke > tick_nohz_idle_stop_tick(), to let tick_nohz_stop_tick()

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-16 Thread Frederic Weisbecker
On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If the tick has been stopped already, but the governor has not asked to > stop it (which it can do sometimes), the idle loop should invoke > tick_nohz_idle_stop_tick(), to let tick_nohz_stop_tick()

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-10 Thread Rafael J. Wysocki
On Fri, Aug 10, 2018 at 8:19 AM, wrote: > On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J . Wysocki wrote: >> From: Rafael J. Wysocki >> >> If the tick has been stopped already, but the governor has not asked to >> stop it (which it can do sometimes), the idle loop should invoke >>

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-10 Thread Rafael J. Wysocki
On Fri, Aug 10, 2018 at 8:19 AM, wrote: > On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J . Wysocki wrote: >> From: Rafael J. Wysocki >> >> If the tick has been stopped already, but the governor has not asked to >> stop it (which it can do sometimes), the idle loop should invoke >>

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-10 Thread leo . yan
On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J . Wysocki wrote: > From: Rafael J. Wysocki > > If the tick has been stopped already, but the governor has not asked to > stop it (which it can do sometimes), the idle loop should invoke > tick_nohz_idle_stop_tick(), to let tick_nohz_stop_tick()

Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-10 Thread leo . yan
On Thu, Aug 09, 2018 at 07:08:34PM +0200, Rafael J . Wysocki wrote: > From: Rafael J. Wysocki > > If the tick has been stopped already, but the governor has not asked to > stop it (which it can do sometimes), the idle loop should invoke > tick_nohz_idle_stop_tick(), to let tick_nohz_stop_tick()

[PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-09 Thread Rafael J. Wysocki
From: Rafael J. Wysocki If the tick has been stopped already, but the governor has not asked to stop it (which it can do sometimes), the idle loop should invoke tick_nohz_idle_stop_tick(), to let tick_nohz_stop_tick() take care of this case properly. Fixes: 554c8aa8ecad (sched: idle: Select

[PATCH] sched: idle: Avoid retaining the tick when it has been stopped

2018-08-09 Thread Rafael J. Wysocki
From: Rafael J. Wysocki If the tick has been stopped already, but the governor has not asked to stop it (which it can do sometimes), the idle loop should invoke tick_nohz_idle_stop_tick(), to let tick_nohz_stop_tick() take care of this case properly. Fixes: 554c8aa8ecad (sched: idle: Select