Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-22 Thread Quan Xu
On 2017-11-16 17:45, Daniel Lezcano wrote: On 16/11/2017 10:12, Quan Xu wrote: On 2017-11-16 06:03, Thomas Gleixner wrote: On Wed, 15 Nov 2017, Peter Zijlstra wrote: On Mon, Nov 13, 2017 at 06:06:02PM +0800, Quan Xu wrote: From: Yang Zhang Implement a generic

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-22 Thread Daniel Lezcano
On 20/11/2017 08:05, Quan Xu wrote: [ ... ] But the irq_timings stuff is heading into the same direction, with a more complex prediction logic which should tell you pretty good how long that idle period is going to be and in case of an interrupt heavy workload this

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-22 Thread Quan Xu
On 2017-11-17 19:36, Thomas Gleixner wrote: On Fri, 17 Nov 2017, Quan Xu wrote: On 2017-11-16 17:53, Thomas Gleixner wrote: That's just plain wrong. We don't want to see any of this PARAVIRT crap in anything outside the architecture/hypervisor interfacing code which really needs it. The

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-22 Thread Quan Xu
On 2017-11-16 06:03, Thomas Gleixner wrote: On Wed, 15 Nov 2017, Peter Zijlstra wrote: On Mon, Nov 13, 2017 at 06:06:02PM +0800, Quan Xu wrote: From: Yang Zhang Implement a generic idle poll which resembles the functionality found in arch/. Provide weak

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-22 Thread Quan Xu
On 2017-11-16 17:53, Thomas Gleixner wrote: On Thu, 16 Nov 2017, Quan Xu wrote: On 2017-11-16 06:03, Thomas Gleixner wrote: --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -210,6 +210,13 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-22 Thread Quan Xu
On 2017-11-16 16:45, Peter Zijlstra wrote: On Wed, Nov 15, 2017 at 11:03:08PM +0100, Thomas Gleixner wrote: If I understand the problem correctly then he wants to avoid the heavy lifting in tick_nohz_idle_enter() in the first place, but there is already an interesting quirk there which makes

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-22 Thread Daniel Lezcano
On 16/11/2017 10:12, Quan Xu wrote: > > > On 2017-11-16 06:03, Thomas Gleixner wrote: >> On Wed, 15 Nov 2017, Peter Zijlstra wrote: >> >>> On Mon, Nov 13, 2017 at 06:06:02PM +0800, Quan Xu wrote: From: Yang Zhang Implement a generic idle poll which

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-17 Thread Thomas Gleixner
On Fri, 17 Nov 2017, Quan Xu wrote: > On 2017-11-16 17:53, Thomas Gleixner wrote: > > That's just plain wrong. We don't want to see any of this PARAVIRT crap in > > anything outside the architecture/hypervisor interfacing code which really > > needs it. > > > > The problem can and must be solved

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-16 Thread Thomas Gleixner
On Thu, 16 Nov 2017, Quan Xu wrote: > On 2017-11-16 06:03, Thomas Gleixner wrote: > --- a/drivers/cpuidle/cpuidle.c > +++ b/drivers/cpuidle/cpuidle.c > @@ -210,6 +210,13 @@ int cpuidle_enter_state(struct cpuidle_device *dev, > struct cpuidle_driver *drv, >     target_state =

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-16 Thread Thomas Gleixner
On Thu, 16 Nov 2017, Quan Xu wrote: > On 2017-11-16 16:45, Peter Zijlstra wrote: > > I really have considered this factor, and try my best not to interfere with > scheduler/idle code. > > if irq_timings code is ready, I can use it directly. I think irq_timings > is not an easy task, I'd like to

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-16 Thread Thomas Gleixner
On Thu, 16 Nov 2017, Peter Zijlstra wrote: > On Wed, Nov 15, 2017 at 11:03:08PM +0100, Thomas Gleixner wrote: > > If I understand the problem correctly then he wants to avoid the heavy > > lifting in tick_nohz_idle_enter() in the first place, but there is already > > an interesting quirk there

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-16 Thread Peter Zijlstra
On Wed, Nov 15, 2017 at 11:03:08PM +0100, Thomas Gleixner wrote: > If I understand the problem correctly then he wants to avoid the heavy > lifting in tick_nohz_idle_enter() in the first place, but there is already > an interesting quirk there which makes it exit early. Sure. And there are

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-15 Thread Thomas Gleixner
On Wed, 15 Nov 2017, Peter Zijlstra wrote: > On Mon, Nov 13, 2017 at 06:06:02PM +0800, Quan Xu wrote: > > From: Yang Zhang > > > > Implement a generic idle poll which resembles the functionality > > found in arch/. Provide weak arch_cpu_idle_poll function which > > can

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-15 Thread Peter Zijlstra
On Mon, Nov 13, 2017 at 06:06:02PM +0800, Quan Xu wrote: > From: Yang Zhang > > Implement a generic idle poll which resembles the functionality > found in arch/. Provide weak arch_cpu_idle_poll function which > can be overridden by the architecture code if needed. No,