public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Chen Gong <gong.chen@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	tony.luck@intel.com, bp@amd64.org, x86@kernel.org,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [patch 2/2] x86: mce: Implement cmci poll mode for intel machines
Date: Wed, 6 Jun 2012 16:46:37 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1206061641450.3086@ionos> (raw)
In-Reply-To: <alpine.LFD.2.02.1206061535410.3086@ionos>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1453 bytes --]

On Wed, 6 Jun 2012, Thomas Gleixner wrote:

> On Wed, 6 Jun 2012, Chen Gong wrote:
> > 于 2012/6/6 18:23, Thomas Gleixner 写道:
> > I think you mean
> > 
> > -               del_timer_sync(t);
> >                 smp_call_function_single(cpu, mce_disable_cpu, &action, 1);
> > +		del_timer_sync(t);
> >                 break;
> 
> No I meant it the way I wrote, but as you don't execute hotplug it's
> irrelevant.
> 
> So the obvious candidate is the mce-injection code, which was
> obviously never tested with DEBUG_PREEMPT enabled.
> 
> raise_local() can be called with preemption enabled from
> raise_mce(). Fix for that below.
> 
> Though I can't see how that would do anything with the timer.

I think I found it. Do you have CONFIG_NO_HZ enabled? Then mod_timer()
will try to move the timer to a different cpu, when the cpu which is
running that code is idle. Bloody obvious :(

I'll send out a combo patch with all changes so far later.

Thanks,
	
	tglx

Index: linux-2.6/arch/x86/kernel/cpu/mcheck/mce.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/mcheck/mce.c
+++ linux-2.6/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1307,7 +1307,7 @@ void mce_timer_kick(unsigned long interv
 
 	if (timer_pending(t)) {
 		if (time_before(when, t->expires))
-			mod_timer(t, when);
+			mod_timer_pinned(t, when);
 	} else {
 		t->expires = round_jiffies(when);
 		add_timer_on(t, smp_processor_id());

  reply	other threads:[~2012-06-06 14:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 17:54 [patch 0/2] x86: mce: Implement poll mode for CMCI Thomas Gleixner
2012-05-24 17:54 ` [patch 1/2] x86: mce Cleanup timer mess Thomas Gleixner
2012-05-25  6:16   ` Borislav Petkov
2012-06-04  2:22   ` Chen Gong
2012-06-04 18:14     ` Luck, Tony
2012-06-04 19:57       ` Thomas Gleixner
2012-06-04 22:18       ` Borislav Petkov
2012-05-24 17:54 ` [patch 2/2] x86: mce: Implement cmci poll mode for intel machines Thomas Gleixner
2012-05-25  6:24   ` Borislav Petkov
2012-05-25  7:31     ` Chen Gong
2012-05-25  9:20       ` Thomas Gleixner
2012-05-25 12:17         ` Thomas Gleixner
2012-05-28  9:47     ` Chen Gong
2012-05-28  9:52   ` Chen Gong
2012-06-04  2:37   ` Chen Gong
2012-06-04 20:01     ` Thomas Gleixner
2012-06-05 11:47       ` Chen Gong
2012-06-05 12:57         ` Borislav Petkov
2012-06-06  1:36           ` Chen Gong
2012-06-06  9:04             ` Borislav Petkov
2012-06-05 13:35         ` Thomas Gleixner
2012-06-06  7:21           ` Chen Gong
2012-06-06  9:18             ` Thomas Gleixner
2012-06-06 10:23               ` Thomas Gleixner
2012-06-06 12:24                 ` Chen Gong
2012-06-06 12:27                   ` Peter Zijlstra
2012-06-06 14:15                   ` Thomas Gleixner
2012-06-06 14:46                     ` Thomas Gleixner [this message]
2012-06-07  3:32                       ` Chen Gong

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=alpine.LFD.2.02.1206061641450.3086@ionos \
    --to=tglx@linutronix.de \
    --cc=bp@amd64.org \
    --cc=gong.chen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /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