linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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:24:07 +0200	[thread overview]
Message-ID: <20130426082407.GB20927@linutronix.de> (raw)
In-Reply-To: <1365705214.9609.58.camel@gandalf.local.home>

* 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 work_struct *work)
> 
> static DECLARE_WORK(mce_trigger_work, mce_do_trigger);
> 
>+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 */
>+	wake_up_interruptible(&mce_chrdev_wait);
>+
>+	/*
>+	 * There is no risk of missing notifications because
>+	 * work_pending is always cleared before the function is
>+	 * executed.
>+	 */
>+	if (mce_helper[0] && !work_pending(&mce_trigger_work))
>+		schedule_work(&mce_trigger_work);

Why is here this work_pending() check? You can't enqueue a work item
twice.

Sebastian

  parent reply	other threads:[~2013-04-26  8:24 UTC|newest]

Thread overview: 14+ 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 13:38 ` Borislav Petkov
2013-04-12 13:44   ` Steven Rostedt
2013-04-25 16:44 ` Sebastian Andrzej Siewior
2013-04-25 17:09   ` Steven Rostedt
2013-04-26  8:22     ` Sebastian Andrzej Siewior
2013-04-26  8:24 ` Sebastian Andrzej Siewior [this message]
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=20130426082407.GB20927@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).