From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ming Lei <tom.leiming@gmail.com>,
Djalal Harouni <tixxdz@opendz.org>,
Borislav Petkov <borislav.petkov@amd.com>,
Tony Luck <tony.luck@intel.com>,
Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
Ingo Molnar <mingo@elte.hu>, Andi Kleen <ak@linux.intel.com>,
linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>,
Kay Sievers <kay.sievers@vrfy.org>,
gouders@et.bocholt.fh-gelsenkirchen.de,
Marcos Souza <marcos.mage@gmail.com>,
Linux PM mailing list <linux-pm@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
"tglx@linutronix.de" <tglx@linutronix.de>,
prasad@linux.vnet.ibm.com, justinmattock@gmail.com,
Jeff Chua <jeff.chua.linux@gmail.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Mel Gorman <mgorman@suse.de>,
Gilad Ben-Yossef <gilad@benyossef.com>
Subject: Re: x86/mce: machine check warning during poweroff
Date: Wed, 18 Jan 2012 16:32:36 +0300 [thread overview]
Message-ID: <20120118133236.GA3878@swordfish.minsk.epam.com> (raw)
In-Reply-To: <4F16C60B.4030903@linux.vnet.ibm.com>
On (01/18/12 18:45), Srivatsa S. Bhat wrote:
> Date: Wed, 18 Jan 2012 18:45:55 +0530
> From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
>
> > On Tue, 2012-01-17 at 15:22 +0530, Srivatsa S. Bhat wrote:
> >> Thanks for the patch, but unfortunately it doesn't fix the problem!
> >> Exactly the same stack traces are seen during a CPU Hotplug stress test.
> >> (I didn't even have to stress it - it is so fragile that just a script
> >> to offline all cpus except the boot cpu was good enough to reproduce the
> >> problem easily.)
> >
> > hmm, that's weird. with the patch, sched_ilb_notifier() should have
> > cleared the cpu going offline from the nohz.idle_cpus_mask. And this
> > should have happened after that cpu is removed from active mask. So
> > no-one else should add that cpu back to the nohz.idle_cpus_mask and this
> > should prevent the issue from happening.
> >
Just a small note, since you're talking about removing CPU from nohz.idle_cpus_mask,
that I'm able to reproduce this problem not only when offlining CPU, but during
onlininig as well (kernel 3.3):
[ 67.587942] CPU1 is up
[ 67.589710] Call Trace:
[ 67.589719] <IRQ> [<ffffffff81030092>] warn_slowpath_common+0x7e/0x96
[ 67.589745] [<ffffffff810300bf>] warn_slowpath_null+0x15/0x17
[ 67.589762] [<ffffffff81018ff7>] native_smp_send_reschedule+0x25/0x56
[ 67.589783] [<ffffffff81067ffe>] trigger_load_balance+0x6ac/0x72e
[ 67.589802] [<ffffffff81067bfd>] ? trigger_load_balance+0x2ab/0x72e
[ 67.589823] [<ffffffff8105f05c>] scheduler_tick+0xe2/0xeb
[ 67.589842] [<ffffffff8103f6ac>] update_process_times+0x60/0x70
[ 67.589863] [<ffffffff8107c1e1>] tick_sched_timer+0x6d/0x96
[ 67.589882] [<ffffffff81053b3b>] __run_hrtimer+0x1c2/0x3a1
[ 67.589900] [<ffffffff8107c174>] ? tick_nohz_handler+0xdf/0xdf
[ 67.589918] [<ffffffff81054721>] hrtimer_interrupt+0xe6/0x1b0
[ 67.589937] [<ffffffff81019bdd>] smp_apic_timer_interrupt+0x80/0x93
[ 67.589958] [<ffffffff814a2f73>] apic_timer_interrupt+0x73/0x80
[ 67.589975] <EOI> [<ffffffff81087bf1>] ? generic_exec_single+0x73/0x8a
[ 67.590000] [<ffffffff81087bea>] ? generic_exec_single+0x6c/0x8a
[ 67.590019] [<ffffffff81017f8b>] ? get_fixed_ranges.constprop.5+0x10b/0x10b
[ 67.590039] [<ffffffff81087d2c>] smp_call_function_single+0x124/0x15c
[ 67.590059] [<ffffffff81017f8b>] ? get_fixed_ranges.constprop.5+0x10b/0x10b
[ 67.590081] [<ffffffff8101696d>] mtrr_save_state+0x19/0x1b
[ 67.590100] [<ffffffff8148bf67>] native_cpu_up+0xa1/0x138
[ 67.590117] [<ffffffff8148d192>] _cpu_up+0x92/0xfc
[ 67.590134] [<ffffffff8147f3eb>] enable_nonboot_cpus+0x48/0xad
[ 67.590154] [<ffffffff8106f080>] suspend_devices_and_enter+0x21a/0x407
[ 67.590173] [<ffffffff8106f391>] enter_state+0x124/0x169
[ 67.590191] [<ffffffff8106e01b>] state_store+0xb7/0x101
[ 67.590212] [<ffffffff8126c82f>] kobj_attr_store+0x17/0x19
[ 67.590230] [<ffffffff8117e20c>] sysfs_write_file+0x103/0x13f
[ 67.590249] [<ffffffff8111f018>] vfs_write+0xad/0x13d
[ 67.590266] [<ffffffff8111f293>] sys_write+0x45/0x6c
[ 67.590282] [<ffffffff814a2439>] system_call_fastpath+0x16/0x1b
Sergey
> > I could reproduce the problem easily with out the patch but when I
> > applied the patch I couldn't recreate the issue. Srivatsa, can you
> > please re-check the kernel you tested indeed has the fix?
> >
> > re-Reviewing the code/patch also doesn't give me a hint.
> >
> >> I have a few questions regarding the synchronization with CPU Hotplug.
> >> What guarantees that the code which selects and IPIs the new ilb is totally
> >> race-free with respect to CPU hotplug and we will never IPI an offline CPU?
> >
> > So, nohz_balancer_kick() gets called only from interrupts disabled.
> > During that time (from selecting the ilb_cpu to sending the IPI), no cpu
> > can go offline. As the offline happens from the stop-machine process
> > context with interrupts disabled.
> >
> > Only thing we need to make sure is the offlined cpu shouldn't be part of
> > the nohz.idle_cpus_mask and for post 3.2 code, posted patch ensures
> > that.
> >
> > For 3.2 and before, when a cpu exits tickless idle, it gets removed from
> > the nohz.idle_cpus_mask (and also from the nohz.load_balancer). And if
> > the cpu is not in the active mask (while going offline), subsequent
> > calls to select_nohz_load_balancer() ensures that the cpu going down
> > doesn't update the nohz structures. So I thought 3.2 shouldn't exhibit
> > this problem.
> >
> >
> >> (As demonstrated above, this issue is in 3.2-rc7
> >> as well.)
> >
> > hmm, don't think we ran into this before 3.2. So, what am I missing from
> > the above? I will try to reproduce it on 3.2 too.
> >
>
>
> I tested again on 3.2. I didn't hit those warnings (IPI to offline cpus).
> It happens only in the post-3.2 kernel.
>
> Regards,
> Srivatsa S. Bhat
> IBM Linux Technology Center
>
next prev parent reply other threads:[~2012-01-18 13:36 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-11 0:00 Djalal Harouni
2012-01-12 14:22 ` Ming Lei
2012-01-13 20:22 ` Srivatsa S. Bhat
2012-01-13 20:34 ` Justin P. Mattock
2012-01-13 20:37 ` Linus Torvalds
2012-01-13 20:53 ` Srivatsa S. Bhat
2012-01-13 21:08 ` Linus Torvalds
2012-01-13 21:24 ` Andi Kleen
2012-01-13 21:38 ` Justin P. Mattock
2012-01-13 22:06 ` Srivatsa S. Bhat
2012-01-13 22:17 ` Alan Stern
2012-01-13 22:18 ` Srivatsa S. Bhat
2012-01-13 23:13 ` Andi Kleen
2012-01-14 0:44 ` Dirk Gouders
2012-01-13 23:02 ` Linus Torvalds
2012-01-13 23:27 ` Srivatsa S. Bhat
2012-01-14 0:05 ` Linus Torvalds
2012-01-14 2:41 ` Srivatsa S. Bhat
2012-01-14 2:53 ` Linus Torvalds
2012-01-14 3:05 ` Srivatsa S. Bhat
2012-01-14 3:10 ` Linus Torvalds
2012-01-14 3:18 ` Srivatsa S. Bhat
2012-01-14 3:41 ` Linus Torvalds
2012-01-14 5:15 ` Tony Luck
2012-01-14 14:49 ` Greg KH
2012-01-14 16:30 ` Alan Stern
2012-01-14 20:45 ` Jeff Chua
2012-01-15 2:05 ` Tony Luck
2012-01-15 2:34 ` Greg KH
2012-01-15 3:36 ` Alan Stern
2012-01-16 18:15 ` Greg KH
2012-01-16 18:11 ` Greg KH
2012-01-16 18:27 ` Luck, Tony
2012-01-16 18:34 ` Greg KH
2012-01-16 18:42 ` Kay Sievers
2012-01-17 2:21 ` Suresh Siddha
2012-01-17 9:52 ` Srivatsa S. Bhat
2012-01-17 16:15 ` Jeff Chua
2012-01-17 16:36 ` Srivatsa S. Bhat
2012-01-18 3:17 ` Suresh Siddha
2012-01-18 10:19 ` Srivatsa S. Bhat
2012-01-18 13:15 ` Srivatsa S. Bhat
2012-01-18 13:32 ` Sergey Senozhatsky [this message]
2012-01-18 22:08 ` Suresh Siddha
2012-01-19 7:50 ` Sergey Senozhatsky
2012-01-19 12:02 ` Srivatsa S. Bhat
2012-01-20 2:28 ` Suresh Siddha
2012-01-23 8:43 ` Peter Zijlstra
2012-01-26 20:27 ` [tip:sched/urgent] sched/nohz: Fix nohz cpu idle load balancing state with cpu hotplug tip-bot for Suresh Siddha
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=20120118133236.GA3878@swordfish.minsk.epam.com \
--to=sergey.senozhatsky@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=ak@linux.intel.com \
--cc=borislav.petkov@amd.com \
--cc=gilad@benyossef.com \
--cc=gouders@et.bocholt.fh-gelsenkirchen.de \
--cc=gregkh@suse.de \
--cc=jeff.chua.linux@gmail.com \
--cc=justinmattock@gmail.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=marcos.mage@gmail.com \
--cc=mgorman@suse.de \
--cc=mingo@elte.hu \
--cc=prasad@linux.vnet.ibm.com \
--cc=rjw@sisk.pl \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=tixxdz@opendz.org \
--cc=tom.leiming@gmail.com \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.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
Powered by JetHome