* Re: [PATCH V3]hrtimer: Fix a performance regression by disable reprogramming in remove_hrtimer [not found] ` <20130909133044.GB31370@twins.programming.kicks-ass.net> @ 2013-09-09 13:46 ` Peter Zijlstra 2013-09-11 8:56 ` Peter Zijlstra 0 siblings, 1 reply; 8+ messages in thread From: Peter Zijlstra @ 2013-09-09 13:46 UTC (permalink / raw) To: Mike Galbraith Cc: Ingo Molnar, linux-kernel, Thomas Gleixner, ethan.kernel, rjw, daniel.lezcano, linux-pm, lenb On Mon, Sep 09, 2013 at 03:30:44PM +0200, Peter Zijlstra wrote: > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c > index fa6964d..486c0ba 100644 > --- a/drivers/idle/intel_idle.c > +++ b/drivers/idle/intel_idle.c > @@ -359,6 +359,14 @@ static int intel_idle(struct cpuidle_device *dev, > if (!(lapic_timer_reliable_states & (1 << (cstate)))) > clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu); > > + current_thread_into()->status |= TS_POLLING; > + > + /* > + * Order against setting of TS_POLLING against the reading of > + * NEED_RESCHED, matched by resched_task(). > + */ > + smp_mb(); > + > if (!need_resched()) { > > __monitor((void *)¤t_thread_info()->flags, 0, 0); > @@ -367,6 +375,8 @@ static int intel_idle(struct cpuidle_device *dev, > __mwait(eax, ecx); > } > > + current_thread_into()->status &= ~TS_POLLING; > + > if (!(lapic_timer_reliable_states & (1 << (cstate)))) > clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu); Hmm, arguably it would be better to set this from intel_idle_cpuidle_driver_init() and clear it whenever this goes away. Not sure how all that works, the cpuidle driver framework seems 'weird'. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V3]hrtimer: Fix a performance regression by disable reprogramming in remove_hrtimer 2013-09-09 13:46 ` [PATCH V3]hrtimer: Fix a performance regression by disable reprogramming in remove_hrtimer Peter Zijlstra @ 2013-09-11 8:56 ` Peter Zijlstra 2013-09-11 10:25 ` Mike Galbraith 0 siblings, 1 reply; 8+ messages in thread From: Peter Zijlstra @ 2013-09-11 8:56 UTC (permalink / raw) To: Mike Galbraith Cc: Ingo Molnar, linux-kernel, Thomas Gleixner, ethan.kernel, rjw, daniel.lezcano, linux-pm, lenb On Mon, Sep 09, 2013 at 03:46:35PM +0200, Peter Zijlstra wrote: > On Mon, Sep 09, 2013 at 03:30:44PM +0200, Peter Zijlstra wrote: > > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c > > index fa6964d..486c0ba 100644 > > --- a/drivers/idle/intel_idle.c > > +++ b/drivers/idle/intel_idle.c > > @@ -359,6 +359,14 @@ static int intel_idle(struct cpuidle_device *dev, > > if (!(lapic_timer_reliable_states & (1 << (cstate)))) > > clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu); > > > > + current_thread_into()->status |= TS_POLLING; > > + > > + /* > > + * Order against setting of TS_POLLING against the reading of > > + * NEED_RESCHED, matched by resched_task(). > > + */ > > + smp_mb(); > > + > > if (!need_resched()) { > > > > __monitor((void *)¤t_thread_info()->flags, 0, 0); > > @@ -367,6 +375,8 @@ static int intel_idle(struct cpuidle_device *dev, > > __mwait(eax, ecx); > > } > > > > + current_thread_into()->status &= ~TS_POLLING; > > + > > if (!(lapic_timer_reliable_states & (1 << (cstate)))) > > clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu); > > Hmm, arguably it would be better to set this from > intel_idle_cpuidle_driver_init() and clear it whenever this goes away. > Not sure how all that works, the cpuidle driver framework seems 'weird'. OK, so I went over the idle stuff again, and we do set TS_POLLING like stuff, it got hidden in current_{clr,set}_polling(). Still if that patch causes extra IPIs its bound to be broken in some creative way.. I'll prod. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V3]hrtimer: Fix a performance regression by disable reprogramming in remove_hrtimer 2013-09-11 8:56 ` Peter Zijlstra @ 2013-09-11 10:25 ` Mike Galbraith 2013-10-04 12:06 ` Ethan Zhao 0 siblings, 1 reply; 8+ messages in thread From: Mike Galbraith @ 2013-09-11 10:25 UTC (permalink / raw) To: Peter Zijlstra Cc: Ingo Molnar, linux-kernel, Thomas Gleixner, ethan.kernel, rjw, daniel.lezcano, linux-pm, lenb On Wed, 2013-09-11 at 10:56 +0200, Peter Zijlstra wrote: > On Mon, Sep 09, 2013 at 03:46:35PM +0200, Peter Zijlstra wrote: > > On Mon, Sep 09, 2013 at 03:30:44PM +0200, Peter Zijlstra wrote: > > > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c > > > index fa6964d..486c0ba 100644 > > > --- a/drivers/idle/intel_idle.c > > > +++ b/drivers/idle/intel_idle.c > > > @@ -359,6 +359,14 @@ static int intel_idle(struct cpuidle_device *dev, > > > if (!(lapic_timer_reliable_states & (1 << (cstate)))) > > > clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu); > > > > > > + current_thread_into()->status |= TS_POLLING; > > > + > > > + /* > > > + * Order against setting of TS_POLLING against the reading of > > > + * NEED_RESCHED, matched by resched_task(). > > > + */ > > > + smp_mb(); > > > + > > > if (!need_resched()) { > > > > > > __monitor((void *)¤t_thread_info()->flags, 0, 0); > > > @@ -367,6 +375,8 @@ static int intel_idle(struct cpuidle_device *dev, > > > __mwait(eax, ecx); > > > } > > > > > > + current_thread_into()->status &= ~TS_POLLING; > > > + > > > if (!(lapic_timer_reliable_states & (1 << (cstate)))) > > > clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu); > > > > Hmm, arguably it would be better to set this from > > intel_idle_cpuidle_driver_init() and clear it whenever this goes away. > > Not sure how all that works, the cpuidle driver framework seems 'weird'. > > OK, so I went over the idle stuff again, and we do set TS_POLLING like > stuff, it got hidden in current_{clr,set}_polling(). > > Still if that patch causes extra IPIs its bound to be broken in some > creative way.. I'll prod. (thanks, when I get a break from testing/poking this'n'that, I'll take a peek too... well, good_intentions++ anyway;) ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V3]hrtimer: Fix a performance regression by disable reprogramming in remove_hrtimer 2013-09-11 10:25 ` Mike Galbraith @ 2013-10-04 12:06 ` Ethan Zhao 2013-10-07 4:41 ` Mike Galbraith 0 siblings, 1 reply; 8+ messages in thread From: Ethan Zhao @ 2013-10-04 12:06 UTC (permalink / raw) To: Mike Galbraith Cc: Peter Zijlstra, Ingo Molnar, LKML, Thomas Gleixner, rjw, daniel.lezcano, linux-pm, lenb Mike, Peter, Seems lots of work has been done these days, studious guys. those patches merged in last stable/dev branch (fix performance regression caused by extra rtimer programming and rescheduling IPI,confusing idle... etc) ? So I could just do a lazy pull for test with my environment. I need catch up with other mail loops with my vacation again. Thanks, Ethan On Wed, Sep 11, 2013 at 6:25 PM, Mike Galbraith <bitbucket@online.de> wrote: > On Wed, 2013-09-11 at 10:56 +0200, Peter Zijlstra wrote: >> On Mon, Sep 09, 2013 at 03:46:35PM +0200, Peter Zijlstra wrote: >> > On Mon, Sep 09, 2013 at 03:30:44PM +0200, Peter Zijlstra wrote: >> > > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c >> > > index fa6964d..486c0ba 100644 >> > > --- a/drivers/idle/intel_idle.c >> > > +++ b/drivers/idle/intel_idle.c >> > > @@ -359,6 +359,14 @@ static int intel_idle(struct cpuidle_device *dev, >> > > if (!(lapic_timer_reliable_states & (1 << (cstate)))) >> > > clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu); >> > > >> > > + current_thread_into()->status |= TS_POLLING; >> > > + >> > > + /* >> > > + * Order against setting of TS_POLLING against the reading of >> > > + * NEED_RESCHED, matched by resched_task(). >> > > + */ >> > > + smp_mb(); >> > > + >> > > if (!need_resched()) { >> > > >> > > __monitor((void *)¤t_thread_info()->flags, 0, 0); >> > > @@ -367,6 +375,8 @@ static int intel_idle(struct cpuidle_device *dev, >> > > __mwait(eax, ecx); >> > > } >> > > >> > > + current_thread_into()->status &= ~TS_POLLING; >> > > + >> > > if (!(lapic_timer_reliable_states & (1 << (cstate)))) >> > > clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu); >> > >> > Hmm, arguably it would be better to set this from >> > intel_idle_cpuidle_driver_init() and clear it whenever this goes away. >> > Not sure how all that works, the cpuidle driver framework seems 'weird'. >> >> OK, so I went over the idle stuff again, and we do set TS_POLLING like >> stuff, it got hidden in current_{clr,set}_polling(). >> >> Still if that patch causes extra IPIs its bound to be broken in some >> creative way.. I'll prod. > > (thanks, when I get a break from testing/poking this'n'that, I'll take a > peek too... well, good_intentions++ anyway;) > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V3]hrtimer: Fix a performance regression by disable reprogramming in remove_hrtimer 2013-10-04 12:06 ` Ethan Zhao @ 2013-10-07 4:41 ` Mike Galbraith 2013-10-07 4:57 ` Ethan Zhao 0 siblings, 1 reply; 8+ messages in thread From: Mike Galbraith @ 2013-10-07 4:41 UTC (permalink / raw) To: Ethan Zhao Cc: Peter Zijlstra, Ingo Molnar, LKML, Thomas Gleixner, rjw, daniel.lezcano, linux-pm, lenb On Fri, 2013-10-04 at 20:06 +0800, Ethan Zhao wrote: > Mike, Peter, > Seems lots of work has been done these days, studious guys. those > patches merged in last stable/dev branch (fix performance regression > caused by extra rtimer programming and rescheduling IPI,confusing > idle... etc) ? So I could just do a lazy pull for test with my > environment. I need catch up with other mail loops with my vacation > again. Massive timer overhead seems to have crawled off and died while I wasn't looking. Peter's fix for IPI woes.. tip commit ea811747 sched, idle: Fix the idle polling state logic ..hasn't yet swum upstream. -Mike ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V3]hrtimer: Fix a performance regression by disable reprogramming in remove_hrtimer 2013-10-07 4:41 ` Mike Galbraith @ 2013-10-07 4:57 ` Ethan Zhao 2013-12-12 14:14 ` Ethan Zhao 0 siblings, 1 reply; 8+ messages in thread From: Ethan Zhao @ 2013-10-07 4:57 UTC (permalink / raw) To: Mike Galbraith Cc: Peter Zijlstra, Ingo Molnar, LKML, Thomas Gleixner, rjw, Daniel Lezcano, linux-pm, Len Brown Got it. On Mon, Oct 7, 2013 at 12:41 PM, Mike Galbraith <bitbucket@online.de> wrote: > On Fri, 2013-10-04 at 20:06 +0800, Ethan Zhao wrote: >> Mike, Peter, >> Seems lots of work has been done these days, studious guys. those >> patches merged in last stable/dev branch (fix performance regression >> caused by extra rtimer programming and rescheduling IPI,confusing >> idle... etc) ? So I could just do a lazy pull for test with my >> environment. I need catch up with other mail loops with my vacation >> again. > > Massive timer overhead seems to have crawled off and died while I wasn't > looking. Peter's fix for IPI woes.. > > tip commit ea811747 sched, idle: Fix the idle polling state logic > > ..hasn't yet swum upstream. > > -Mike > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V3]hrtimer: Fix a performance regression by disable reprogramming in remove_hrtimer 2013-10-07 4:57 ` Ethan Zhao @ 2013-12-12 14:14 ` Ethan Zhao 2013-12-12 14:42 ` Mike Galbraith 0 siblings, 1 reply; 8+ messages in thread From: Ethan Zhao @ 2013-12-12 14:14 UTC (permalink / raw) To: Mike Galbraith Cc: Peter Zijlstra, Ingo Molnar, LKML, Thomas Gleixner, rjw, Daniel Lezcano, linux-pm, Len Brown Mike, it seems the IPI issue got root cause (cpu hardware errata ) now ? I only catch some pieces of the mails, is that to say the crazy horse made by Intel will wake up unexpected, and eat too much reschedule IPI, then the horse got hotter, performance down, and so the fix would be a 'CFLUSH' to all the buggy CPU, is that right ? Thanks, Ethan On Mon, Oct 7, 2013 at 12:57 PM, Ethan Zhao <ethan.kernel@gmail.com> wrote: > Got it. > > On Mon, Oct 7, 2013 at 12:41 PM, Mike Galbraith <bitbucket@online.de> wrote: >> On Fri, 2013-10-04 at 20:06 +0800, Ethan Zhao wrote: >>> Mike, Peter, >>> Seems lots of work has been done these days, studious guys. those >>> patches merged in last stable/dev branch (fix performance regression >>> caused by extra rtimer programming and rescheduling IPI,confusing >>> idle... etc) ? So I could just do a lazy pull for test with my >>> environment. I need catch up with other mail loops with my vacation >>> again. >> >> Massive timer overhead seems to have crawled off and died while I wasn't >> looking. Peter's fix for IPI woes.. >> >> tip commit ea811747 sched, idle: Fix the idle polling state logic >> >> ..hasn't yet swum upstream. >> >> -Mike >> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V3]hrtimer: Fix a performance regression by disable reprogramming in remove_hrtimer 2013-12-12 14:14 ` Ethan Zhao @ 2013-12-12 14:42 ` Mike Galbraith 0 siblings, 0 replies; 8+ messages in thread From: Mike Galbraith @ 2013-12-12 14:42 UTC (permalink / raw) To: Ethan Zhao Cc: Peter Zijlstra, Ingo Molnar, LKML, Thomas Gleixner, rjw, Daniel Lezcano, linux-pm, Len Brown On Thu, 2013-12-12 at 22:14 +0800, Ethan Zhao wrote: > Mike, > it seems the IPI issue got root cause (cpu hardware errata ) now ? > I only catch some pieces of the mails, is that to say the crazy horse > made by Intel will wake up unexpected, and eat too much reschedule > IPI, then the horse got hotter, performance down, and so the fix would > be a 'CFLUSH' to all the buggy CPU, is that right ? You're mixing a couple different issues together, but yeah, close enough. The barking amazonian tree guppy is being saved as we speak. -Mike ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-12-12 14:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20130729115701.GD3008@twins.programming.kicks-ass.net>
[not found] ` <24EECBCC-F655-404F-8946-73CC36095A5F@gmail.com>
[not found] ` <1378362989.18435.2.camel@marge.simpson.net>
[not found] ` <20130905111428.GB23362@gmail.com>
[not found] ` <1378386697.6567.9.camel@marge.simpson.net>
[not found] ` <20130905133750.GA26637@gmail.com>
[not found] ` <1378445942.5434.31.camel@marge.simpson.net>
[not found] ` <20130909122325.GX31370@twins.programming.kicks-ass.net>
[not found] ` <1378730538.5586.30.camel@marge.simpson.net>
[not found] ` <20130909133044.GB31370@twins.programming.kicks-ass.net>
2013-09-09 13:46 ` [PATCH V3]hrtimer: Fix a performance regression by disable reprogramming in remove_hrtimer Peter Zijlstra
2013-09-11 8:56 ` Peter Zijlstra
2013-09-11 10:25 ` Mike Galbraith
2013-10-04 12:06 ` Ethan Zhao
2013-10-07 4:41 ` Mike Galbraith
2013-10-07 4:57 ` Ethan Zhao
2013-12-12 14:14 ` Ethan Zhao
2013-12-12 14:42 ` Mike Galbraith
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox