Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-05-03 Thread Sebastian Andrzej Siewior
On 05/02/2013 04:33 PM, Steven Rostedt wrote: >> mce_notify_irq() can use simple_waitqueue, no? > > Yeah, and I went down that path. > > But it also schedules work, which has the issue. Hmm, okay. >> The other issue is that mce_report_event() is scheduling a per-cpu >> workqueue

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-05-03 Thread Sebastian Andrzej Siewior
On 05/02/2013 04:33 PM, Steven Rostedt wrote: mce_notify_irq() can use simple_waitqueue, no? Yeah, and I went down that path. But it also schedules work, which has the issue. Hmm, okay. The other issue is that mce_report_event() is scheduling a per-cpu workqueue (mce_schedule_work) in

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-05-02 Thread Steven Rostedt
On Fri, 2013-04-26 at 10:41 +0200, Sebastian Andrzej Siewior wrote: > * Steven Rostedt | 2013-04-11 14:33:34 [-0400]: > > >As wait queue locks are notorious for long hold times, we can not > >convert them to raw_spin_locks without causing issues with -rt. But > >Thomas has created a "simple-wait"

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-05-02 Thread Steven Rostedt
Grumble, somehow these emails got lost in the crowd. On Fri, 2013-04-26 at 10:24 +0200, Sebastian Andrzej Siewior wrote: > * Steven Rostedt | 2013-04-11 14:33:34 [-0400]: > > >diff --git a/arch/x86/kernel/cpu/mcheck/mce.c > >b/arch/x86/kernel/cpu/mcheck/mce.c > >index e8d8ad0..060e473 100644 >

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-05-02 Thread Steven Rostedt
Grumble, somehow these emails got lost in the crowd. On Fri, 2013-04-26 at 10:24 +0200, Sebastian Andrzej Siewior wrote: * Steven Rostedt | 2013-04-11 14:33:34 [-0400]: diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index e8d8ad0..060e473 100644 ---

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-05-02 Thread Steven Rostedt
On Fri, 2013-04-26 at 10:41 +0200, Sebastian Andrzej Siewior wrote: * Steven Rostedt | 2013-04-11 14:33:34 [-0400]: As wait queue locks are notorious for long hold times, we can not convert them to raw_spin_locks without causing issues with -rt. But Thomas has created a simple-wait structure

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-26 Thread Sebastian Andrzej Siewior
* Steven Rostedt | 2013-04-11 14:33:34 [-0400]: >As wait queue locks are notorious for long hold times, we can not >convert them to raw_spin_locks without causing issues with -rt. But >Thomas has created a "simple-wait" structure that uses raw spin locks >which may have been a good fit. >

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-26 Thread Sebastian Andrzej Siewior
* Steven Rostedt | 2013-04-11 14:33:34 [-0400]: >diff --git a/arch/x86/kernel/cpu/mcheck/mce.c >b/arch/x86/kernel/cpu/mcheck/mce.c >index e8d8ad0..060e473 100644 >--- a/arch/x86/kernel/cpu/mcheck/mce.c >+++ b/arch/x86/kernel/cpu/mcheck/mce.c >@@ -1308,6 +1309,61 @@ static void

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-26 Thread Sebastian Andrzej Siewior
* Steven Rostedt | 2013-04-25 13:09:37 [-0400]: >Thanks, I didn't look hard at the warnings. Now that I booted the kernel I see this |INFO: task mce-notify:78 blocked for more than 120 seconds. |"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. |mce-notify D

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-26 Thread Sebastian Andrzej Siewior
* Steven Rostedt | 2013-04-25 13:09:37 [-0400]: Thanks, I didn't look hard at the warnings. Now that I booted the kernel I see this |INFO: task mce-notify:78 blocked for more than 120 seconds. |echo 0 /proc/sys/kernel/hung_task_timeout_secs disables this message. |mce-notify D 0086

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-26 Thread Sebastian Andrzej Siewior
* Steven Rostedt | 2013-04-11 14:33:34 [-0400]: diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index e8d8ad0..060e473 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -1308,6 +1309,61 @@ static void mce_do_trigger(struct

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-26 Thread Sebastian Andrzej Siewior
* Steven Rostedt | 2013-04-11 14:33:34 [-0400]: As wait queue locks are notorious for long hold times, we can not convert them to raw_spin_locks without causing issues with -rt. But Thomas has created a simple-wait structure that uses raw spin locks which may have been a good fit. Unfortunately,

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-25 Thread Steven Rostedt
On Thu, 2013-04-25 at 18:44 +0200, Sebastian Andrzej Siewior wrote: > * Steven Rostedt | 2013-04-11 14:33:34 [-0400]: > > >Comments? > > So you don't mind if I take this for v3.8? > I fixed > > |arch/x86/kernel/cpu/mcheck/mce.c:1392:13: warning: function declaration > isn’t a prototype

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-25 Thread Sebastian Andrzej Siewior
* Steven Rostedt | 2013-04-11 14:33:34 [-0400]: >Comments? So you don't mind if I take this for v3.8? I fixed |arch/x86/kernel/cpu/mcheck/mce.c:1392:13: warning: function declaration isn’t a prototype [-Wstrict-prototypes] >+static void mce_notify_work() ^^

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-25 Thread Sebastian Andrzej Siewior
* Steven Rostedt | 2013-04-11 14:33:34 [-0400]: Comments? So you don't mind if I take this for v3.8? I fixed |arch/x86/kernel/cpu/mcheck/mce.c:1392:13: warning: function declaration isn’t a prototype [-Wstrict-prototypes] +static void mce_notify_work() ^^

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-25 Thread Steven Rostedt
On Thu, 2013-04-25 at 18:44 +0200, Sebastian Andrzej Siewior wrote: * Steven Rostedt | 2013-04-11 14:33:34 [-0400]: Comments? So you don't mind if I take this for v3.8? I fixed |arch/x86/kernel/cpu/mcheck/mce.c:1392:13: warning: function declaration isn’t a prototype

RE: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-12 Thread Luck, Tony
> I'm not (yet). But I just wanted to make sure there wasn't any little > subtleties that I might be missing. I don't think there are any hidden subtleties ... if there are then they are hidden from me too. -Tony

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-12 Thread Steven Rostedt
On Fri, 2013-04-12 at 15:38 +0200, Borislav Petkov wrote: > > +static void __mce_notify_work(void) > > +{ > > + /* Not more than two messages every minute */ > > + static DEFINE_RATELIMIT_STATE(ratelimit, 60*HZ, 2); > > + > > + /* wake processes polling /dev/mcelog */ > > +

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-12 Thread Steven Rostedt
On Fri, 2013-04-12 at 15:31 +0200, Borislav Petkov wrote: > On Thu, Apr 11, 2013 at 02:33:34PM -0400, Steven Rostedt wrote: > > Comments? > > I don't have a problem with it except with the yelling - I think I've > gone deaf. And for Rostedt code it is pretty clean and even *I* can > understand it

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-12 Thread Borislav Petkov
On Thu, Apr 11, 2013 at 02:33:34PM -0400, Steven Rostedt wrote: > diff --git a/arch/x86/kernel/cpu/mcheck/mce.c > b/arch/x86/kernel/cpu/mcheck/mce.c > index e8d8ad0..060e473 100644 > --- a/arch/x86/kernel/cpu/mcheck/mce.c > +++ b/arch/x86/kernel/cpu/mcheck/mce.c > @@ -18,6 +18,7 @@ > #include >

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-12 Thread Borislav Petkov
On Thu, Apr 11, 2013 at 02:33:34PM -0400, Steven Rostedt wrote: > Comments? I don't have a problem with it except with the yelling - I think I've gone deaf. And for Rostedt code it is pretty clean and even *I* can understand it :-). Tony? Steve, stupid question: since this is -rt only, why even

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-12 Thread Borislav Petkov
On Thu, Apr 11, 2013 at 02:33:34PM -0400, Steven Rostedt wrote: Comments? I don't have a problem with it except with the yelling - I think I've gone deaf. And for Rostedt code it is pretty clean and even *I* can understand it :-). Tony? Steve, stupid question: since this is -rt only, why even

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-12 Thread Borislav Petkov
On Thu, Apr 11, 2013 at 02:33:34PM -0400, Steven Rostedt wrote: diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index e8d8ad0..060e473 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -18,6 +18,7 @@ #include

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-12 Thread Steven Rostedt
On Fri, 2013-04-12 at 15:31 +0200, Borislav Petkov wrote: On Thu, Apr 11, 2013 at 02:33:34PM -0400, Steven Rostedt wrote: Comments? I don't have a problem with it except with the yelling - I think I've gone deaf. And for Rostedt code it is pretty clean and even *I* can understand it :-).

Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-12 Thread Steven Rostedt
On Fri, 2013-04-12 at 15:38 +0200, Borislav Petkov wrote: +static void __mce_notify_work(void) +{ + /* Not more than two messages every minute */ + static DEFINE_RATELIMIT_STATE(ratelimit, 60*HZ, 2); + + /* wake processes polling /dev/mcelog */ +

RE: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT

2013-04-12 Thread Luck, Tony
I'm not (yet). But I just wanted to make sure there wasn't any little subtleties that I might be missing. I don't think there are any hidden subtleties ... if there are then they are hidden from me too. -Tony