From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
RT <linux-rt-users@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Clark Williams <clark@redhat.com>, John Kacur <jkacur@redhat.com>,
Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>,
Mauro Carvalho Chehab <mchehab@redhat.com>,
Ingo Molnar <mingo@kernel.org>,
"H. Peter Anvin" <hpa@linux.intel.com>
Subject: Re: [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT
Date: Fri, 26 Apr 2013 10:22:35 +0200 [thread overview]
Message-ID: <20130426082235.GA20927@linutronix.de> (raw)
In-Reply-To: <1366909777.10248.17.camel@gandalf.local.home>
* 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 00000086 0 78 2 0x00000000
| f2e1bf2c 00000096 f2e1bebc 00000086 f2e1becc c1466606 f3440000 00000001
| c1689000 c106dd0a f2cdddf0 f3471f50 00000000 c1690f00 00000007 00000006
| c146662d f2cdddf0 00000282 00000001 f3449ef8 00000282 f2e1bf10 c106b67d
|Call Trace:
| [<c1466606>] ? _raw_spin_unlock_irqrestore+0x36/0x70
| [<c106dd0a>] ? try_to_wake_up+0x5a/0x260
| [<c146662d>] ? _raw_spin_unlock_irqrestore+0x5d/0x70
| [<c106b67d>] ? sub_preempt_count+0x4d/0xb0
| [<c1466606>] ? _raw_spin_unlock_irqrestore+0x36/0x70
| [<c101b620>] ? set_bank+0x50/0x50
| [<c1464d7e>] schedule+0x1e/0x50
| [<c105bb07>] kthread+0x67/0x90
| [<c1466662>] ? _raw_spin_unlock_irq+0x22/0x60
| [<c14671b7>] ret_from_kernel_thread+0x1b/0x28
| [<c105baa0>] ? __init_kthread_worker+0x80/0x80
|no locks held by mce-notify/78.
because the new thread is still TASK_UNINTERRUPTIBLE and nobody wakes it
up. So I did this:
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index c2d6dc7..332e133 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1371,17 +1371,19 @@ struct task_struct *mce_notify_helper;
static int mce_notify_helper_thread(void *unused)
{
- while (!kthread_should_stop()) {
- __mce_notify_work();
+ while (1) {
set_current_state(TASK_INTERRUPTIBLE);
schedule();
+ if (kthread_should_stop())
+ break;
+ __mce_notify_work();
}
return 0;
}
static int mce_notify_work_init(void)
{
- mce_notify_helper = kthread_create(mce_notify_helper_thread, NULL,
+ mce_notify_helper = kthread_run(mce_notify_helper_thread, NULL,
"mce-notify");
if (!mce_notify_helper)
return -ENOMEM;
>
>-- Steve
Sebastian
next prev parent reply other threads:[~2013-04-26 8:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 18:33 [PATCH RT v2] x86/mce: Defer mce wakeups to threads for PREEMPT_RT Steven Rostedt
2013-04-12 13:31 ` Borislav Petkov
2013-04-12 13:42 ` Steven Rostedt
2013-04-12 21:44 ` Luck, Tony
2013-04-12 21:44 ` Luck, Tony
2013-04-12 13:38 ` Borislav Petkov
2013-04-12 13:44 ` Steven Rostedt
2013-04-25 16:44 ` Sebastian Andrzej Siewior
2013-04-25 16:44 ` Sebastian Andrzej Siewior
2013-04-25 17:09 ` Steven Rostedt
2013-04-25 17:09 ` Steven Rostedt
2013-04-26 8:22 ` Sebastian Andrzej Siewior [this message]
2013-04-26 8:24 ` Sebastian Andrzej Siewior
2013-05-02 14:26 ` Steven Rostedt
2013-04-26 8:41 ` Sebastian Andrzej Siewior
2013-05-02 14:33 ` Steven Rostedt
2013-05-03 9:31 ` Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130426082235.GA20927@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=clark@redhat.com \
--cc=hpa@linux.intel.com \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.