Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Peter Zijlstra
On Wed, Feb 12, 2014 at 10:19:42AM -0800, Andy Lutomirski wrote: > > static void ttwu_queue_remote(struct task_struct *p, int cpu) > > { > > - if (llist_add(>wake_entry, _rq(cpu)->wake_list)) > > - smp_send_reschedule(cpu); > > + struct rq *rq = cpu_rq(cpu); > > + > > +

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Andy Lutomirski
On Wed, Feb 12, 2014 at 8:39 AM, Peter Zijlstra wrote: > On Wed, Feb 12, 2014 at 07:49:07AM -0800, Andy Lutomirski wrote: >> On Wed, Feb 12, 2014 at 2:13 AM, Peter Zijlstra wrote: >> Exactly. AFAICT the only reason that any of this code holds rq->lock >> (especially ttwu_queue_remote, which I

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Peter Zijlstra
On Wed, Feb 12, 2014 at 06:46:39PM +0100, Frederic Weisbecker wrote: > Ok but if the target is idle, dynticks and not polling, we don't have the > choice > but to send an IPI, right? I'm talking about this kind of case. Yes; but Andy doesn't seem concerned with such hardware (!x86). Anything

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Frederic Weisbecker
On Wed, Feb 12, 2014 at 05:43:56PM +0100, Peter Zijlstra wrote: > On Wed, Feb 12, 2014 at 04:59:52PM +0100, Frederic Weisbecker wrote: > > 2014-02-12 11:13 GMT+01:00 Peter Zijlstra : > > > On Tue, Feb 11, 2014 at 02:34:11PM -0800, Andy Lutomirski wrote: > > >> On Tue, Feb 11, 2014 at 1:21 PM,

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Peter Zijlstra
On Wed, Feb 12, 2014 at 04:59:52PM +0100, Frederic Weisbecker wrote: > 2014-02-12 11:13 GMT+01:00 Peter Zijlstra : > > On Tue, Feb 11, 2014 at 02:34:11PM -0800, Andy Lutomirski wrote: > >> On Tue, Feb 11, 2014 at 1:21 PM, Thomas Gleixner > >> wrote: > >> >> A small number of reschedule

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Peter Zijlstra
On Wed, Feb 12, 2014 at 07:49:07AM -0800, Andy Lutomirski wrote: > On Wed, Feb 12, 2014 at 2:13 AM, Peter Zijlstra wrote: > > On Tue, Feb 11, 2014 at 02:34:11PM -0800, Andy Lutomirski wrote: > >> On Tue, Feb 11, 2014 at 1:21 PM, Thomas Gleixner > >> wrote: > >> >> A small number of reschedule

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Frederic Weisbecker
2014-02-12 11:13 GMT+01:00 Peter Zijlstra : > On Tue, Feb 11, 2014 at 02:34:11PM -0800, Andy Lutomirski wrote: >> On Tue, Feb 11, 2014 at 1:21 PM, Thomas Gleixner wrote: >> >> A small number of reschedule interrupts appear to be due to a race: >> >> both resched_task and wake_up_idle_cpu do,

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Andy Lutomirski
On Wed, Feb 12, 2014 at 2:13 AM, Peter Zijlstra wrote: > On Tue, Feb 11, 2014 at 02:34:11PM -0800, Andy Lutomirski wrote: >> On Tue, Feb 11, 2014 at 1:21 PM, Thomas Gleixner wrote: >> >> A small number of reschedule interrupts appear to be due to a race: >> >> both resched_task and

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Peter Zijlstra
On Tue, Feb 11, 2014 at 02:34:11PM -0800, Andy Lutomirski wrote: > On Tue, Feb 11, 2014 at 1:21 PM, Thomas Gleixner wrote: > >> A small number of reschedule interrupts appear to be due to a race: > >> both resched_task and wake_up_idle_cpu do, essentially: > >> > >> set_tsk_need_resched(t); > >>

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Peter Zijlstra
On Tue, Feb 11, 2014 at 02:34:11PM -0800, Andy Lutomirski wrote: On Tue, Feb 11, 2014 at 1:21 PM, Thomas Gleixner t...@linutronix.de wrote: A small number of reschedule interrupts appear to be due to a race: both resched_task and wake_up_idle_cpu do, essentially: set_tsk_need_resched(t);

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Andy Lutomirski
On Wed, Feb 12, 2014 at 2:13 AM, Peter Zijlstra pet...@infradead.org wrote: On Tue, Feb 11, 2014 at 02:34:11PM -0800, Andy Lutomirski wrote: On Tue, Feb 11, 2014 at 1:21 PM, Thomas Gleixner t...@linutronix.de wrote: A small number of reschedule interrupts appear to be due to a race: both

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Frederic Weisbecker
2014-02-12 11:13 GMT+01:00 Peter Zijlstra pet...@infradead.org: On Tue, Feb 11, 2014 at 02:34:11PM -0800, Andy Lutomirski wrote: On Tue, Feb 11, 2014 at 1:21 PM, Thomas Gleixner t...@linutronix.de wrote: A small number of reschedule interrupts appear to be due to a race: both resched_task

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Peter Zijlstra
On Wed, Feb 12, 2014 at 07:49:07AM -0800, Andy Lutomirski wrote: On Wed, Feb 12, 2014 at 2:13 AM, Peter Zijlstra pet...@infradead.org wrote: On Tue, Feb 11, 2014 at 02:34:11PM -0800, Andy Lutomirski wrote: On Tue, Feb 11, 2014 at 1:21 PM, Thomas Gleixner t...@linutronix.de wrote: A

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Peter Zijlstra
On Wed, Feb 12, 2014 at 04:59:52PM +0100, Frederic Weisbecker wrote: 2014-02-12 11:13 GMT+01:00 Peter Zijlstra pet...@infradead.org: On Tue, Feb 11, 2014 at 02:34:11PM -0800, Andy Lutomirski wrote: On Tue, Feb 11, 2014 at 1:21 PM, Thomas Gleixner t...@linutronix.de wrote: A small number

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Frederic Weisbecker
On Wed, Feb 12, 2014 at 05:43:56PM +0100, Peter Zijlstra wrote: On Wed, Feb 12, 2014 at 04:59:52PM +0100, Frederic Weisbecker wrote: 2014-02-12 11:13 GMT+01:00 Peter Zijlstra pet...@infradead.org: On Tue, Feb 11, 2014 at 02:34:11PM -0800, Andy Lutomirski wrote: On Tue, Feb 11, 2014 at

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Peter Zijlstra
On Wed, Feb 12, 2014 at 06:46:39PM +0100, Frederic Weisbecker wrote: Ok but if the target is idle, dynticks and not polling, we don't have the choice but to send an IPI, right? I'm talking about this kind of case. Yes; but Andy doesn't seem concerned with such hardware (!x86). Anything x86

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Andy Lutomirski
On Wed, Feb 12, 2014 at 8:39 AM, Peter Zijlstra pet...@infradead.org wrote: On Wed, Feb 12, 2014 at 07:49:07AM -0800, Andy Lutomirski wrote: On Wed, Feb 12, 2014 at 2:13 AM, Peter Zijlstra pet...@infradead.org wrote: Exactly. AFAICT the only reason that any of this code holds rq-lock

Re: Too many rescheduling interrupts (still!)

2014-02-12 Thread Peter Zijlstra
On Wed, Feb 12, 2014 at 10:19:42AM -0800, Andy Lutomirski wrote: static void ttwu_queue_remote(struct task_struct *p, int cpu) { - if (llist_add(p-wake_entry, cpu_rq(cpu)-wake_list)) - smp_send_reschedule(cpu); + struct rq *rq = cpu_rq(cpu); + + if

Re: Too many rescheduling interrupts (still!)

2014-02-11 Thread Andy Lutomirski
On Tue, Feb 11, 2014 at 1:21 PM, Thomas Gleixner wrote: > On Tue, 11 Feb 2014, Andy Lutomirski wrote: > > Just adding Peter for now, as I'm too tired to grok the issue right > now. > >> Rumor has it that Linux 3.13 was supposed to get rid of all the silly >> rescheduling interrupts. It doesn't,

Re: Too many rescheduling interrupts (still!)

2014-02-11 Thread Thomas Gleixner
On Tue, 11 Feb 2014, Andy Lutomirski wrote: Just adding Peter for now, as I'm too tired to grok the issue right now. > Rumor has it that Linux 3.13 was supposed to get rid of all the silly > rescheduling interrupts. It doesn't, although it does seem to have > improved the situation. > > A

Too many rescheduling interrupts (still!)

2014-02-11 Thread Andy Lutomirski
Rumor has it that Linux 3.13 was supposed to get rid of all the silly rescheduling interrupts. It doesn't, although it does seem to have improved the situation. A small number of reschedule interrupts appear to be due to a race: both resched_task and wake_up_idle_cpu do, essentially:

Too many rescheduling interrupts (still!)

2014-02-11 Thread Andy Lutomirski
Rumor has it that Linux 3.13 was supposed to get rid of all the silly rescheduling interrupts. It doesn't, although it does seem to have improved the situation. A small number of reschedule interrupts appear to be due to a race: both resched_task and wake_up_idle_cpu do, essentially:

Re: Too many rescheduling interrupts (still!)

2014-02-11 Thread Thomas Gleixner
On Tue, 11 Feb 2014, Andy Lutomirski wrote: Just adding Peter for now, as I'm too tired to grok the issue right now. Rumor has it that Linux 3.13 was supposed to get rid of all the silly rescheduling interrupts. It doesn't, although it does seem to have improved the situation. A small

Re: Too many rescheduling interrupts (still!)

2014-02-11 Thread Andy Lutomirski
On Tue, Feb 11, 2014 at 1:21 PM, Thomas Gleixner t...@linutronix.de wrote: On Tue, 11 Feb 2014, Andy Lutomirski wrote: Just adding Peter for now, as I'm too tired to grok the issue right now. Rumor has it that Linux 3.13 was supposed to get rid of all the silly rescheduling interrupts. It