Re: [PATCH] sched: idle: Reenable sched tick for cpuidle request

2018-08-10 Thread Rafael J. Wysocki
On Fri, Aug 10, 2018 at 7:53 AM, wrote: > On Thu, Aug 09, 2018 at 11:31:46PM +0200, Rafael J . Wysocki wrote: > > [...] > >> > >> And I really would prefer to avoid restarting the tick here, because >> > >> it is overhead and quite likely unnecessary. >> > > >> > > I understand the logic when rea

Re: [PATCH] sched: idle: Reenable sched tick for cpuidle request

2018-08-09 Thread leo . yan
On Thu, Aug 09, 2018 at 11:31:46PM +0200, Rafael J . Wysocki wrote: [...] > > >> And I really would prefer to avoid restarting the tick here, because > > >> it is overhead and quite likely unnecessary. > > > > > > I understand the logic when read the code, actually I did some experiments > > > on

Re: [PATCH] sched: idle: Reenable sched tick for cpuidle request

2018-08-09 Thread Rafael J. Wysocki
On Thursday, August 9, 2018 6:43:55 PM CEST Rafael J. Wysocki wrote: > On Thu, Aug 9, 2018 at 6:29 PM, wrote: > > On Thu, Aug 09, 2018 at 05:42:30PM +0200, Rafael J. Wysocki wrote: > > > > [...] > > > >> >> This issue can be easily reproduce with the case on Arm Hikey board: use > >> >> CPU0 to s

Re: [PATCH] sched: idle: Reenable sched tick for cpuidle request

2018-08-09 Thread Rafael J. Wysocki
On Thu, Aug 9, 2018 at 7:04 PM, wrote: > On Thu, Aug 09, 2018 at 06:43:55PM +0200, Rafael J. Wysocki wrote: >> On Thu, Aug 9, 2018 at 6:29 PM, wrote: >> > On Thu, Aug 09, 2018 at 05:42:30PM +0200, Rafael J. Wysocki wrote: >> > >> > [...] >> > >> >> >> This issue can be easily reproduce with the

Re: [PATCH] sched: idle: Reenable sched tick for cpuidle request

2018-08-09 Thread leo . yan
On Thu, Aug 09, 2018 at 06:43:55PM +0200, Rafael J. Wysocki wrote: > On Thu, Aug 9, 2018 at 6:29 PM, wrote: > > On Thu, Aug 09, 2018 at 05:42:30PM +0200, Rafael J. Wysocki wrote: > > > > [...] > > > >> >> This issue can be easily reproduce with the case on Arm Hikey board: use > >> >> CPU0 to sen

Re: [PATCH] sched: idle: Reenable sched tick for cpuidle request

2018-08-09 Thread Rafael J. Wysocki
On Thu, Aug 9, 2018 at 6:29 PM, wrote: > On Thu, Aug 09, 2018 at 05:42:30PM +0200, Rafael J. Wysocki wrote: > > [...] > >> >> This issue can be easily reproduce with the case on Arm Hikey board: use >> >> CPU0 to send IPI to CPU7, CPU7 receives the IPI and in the callback >> >> function it start

Re: [PATCH] sched: idle: Reenable sched tick for cpuidle request

2018-08-09 Thread leo . yan
On Thu, Aug 09, 2018 at 05:42:30PM +0200, Rafael J. Wysocki wrote: [...] > >> This issue can be easily reproduce with the case on Arm Hikey board: use > >> CPU0 to send IPI to CPU7, CPU7 receives the IPI and in the callback > >> function it start a hrtimer with 4ms, so the 4ms timer delta value c

Re: [PATCH] sched: idle: Reenable sched tick for cpuidle request

2018-08-09 Thread Rafael J. Wysocki
On Thu, Aug 9, 2018 at 2:05 PM, Rafael J. Wysocki wrote: > On Thursday, August 9, 2018 7:47:27 AM CEST Leo Yan wrote: >> The idle loop stops tick by respecting the decision from cpuidle >> framework, if the condition 'need_resched()' is false without any task >> scheduling, the CPU keeps running i

Re: [PATCH] sched: idle: Reenable sched tick for cpuidle request

2018-08-09 Thread Rafael J. Wysocki
On Thursday, August 9, 2018 7:47:27 AM CEST Leo Yan wrote: > The idle loop stops tick by respecting the decision from cpuidle > framework, if the condition 'need_resched()' is false without any task > scheduling, the CPU keeps running in the loop in do_idle() and it has no > chance call tick_nohz_i

Re: [PATCH] sched: idle: Reenable sched tick for cpuidle request

2018-08-09 Thread leo . yan
On Thu, Aug 09, 2018 at 12:45:49PM +0200, Peter Zijlstra wrote: > On Thu, Aug 09, 2018 at 01:47:27PM +0800, Leo Yan wrote: > > diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c > > index 1a3e9bd..802286e 100644 > > --- a/kernel/sched/idle.c > > +++ b/kernel/sched/idle.c > > @@ -190,10 +190,18

Re: [PATCH] sched: idle: Reenable sched tick for cpuidle request

2018-08-09 Thread Peter Zijlstra
On Thu, Aug 09, 2018 at 01:47:27PM +0800, Leo Yan wrote: > diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c > index 1a3e9bd..802286e 100644 > --- a/kernel/sched/idle.c > +++ b/kernel/sched/idle.c > @@ -190,10 +190,18 @@ static void cpuidle_idle_call(void) >*/ > n

Re: [PATCH] sched: idle: Reenable sched tick for cpuidle request

2018-08-08 Thread leo . yan
On Thu, Aug 09, 2018 at 01:47:27PM +0800, Leo Yan wrote: > The idle loop stops tick by respecting the decision from cpuidle > framework, if the condition 'need_resched()' is false without any task > scheduling, the CPU keeps running in the loop in do_idle() and it has no > chance call tick_nohz_idl