From: Tang Chen <tangchen@cn.fujitsu.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Borislav Petkov <bp@amd64.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"miaox@cn.fujitsu.com" <miaox@cn.fujitsu.com>,
"laijs@cn.fujitsu.com" <laijs@cn.fujitsu.com>,
"wency@cn.fujitsu.com" <wency@cn.fujitsu.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH v2 2/2] Do not change worker's running cpu in cmci_rediscover().
Date: Mon, 22 Oct 2012 11:33:16 +0800 [thread overview]
Message-ID: <5084BE7C.4020303@cn.fujitsu.com> (raw)
In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F19D57AA5@ORSMSX108.amr.corp.intel.com>
On 10/20/2012 01:21 AM, Luck, Tony wrote:
>> In this case, the following BUG_ON in try_to_wake_up_local() will be triggered:
>> BUG_ON(rq != this_rq());
>
> Logically this looks OK - what is the test case to trigger this? I've done a moderate
> amount of testing of cpu online/offline while injecting corrected errors (when testing
> the CMCI storm patches) ... but didn't see this problem.
Hi Tony, Borislav,
Here is my case.
I have 2 nodes, node0 and node1. node1 could be hotpluged.
node0 has cpu0 ~ cpu15, node1 has cpu16 ~ cpu31.
I online all the cpus on node1, and hot-remove node1 directly.
When this problem is triggered, current is a work thread.
For example: cpu20 is dying. current is on cpu21, it migrates
itself to cpu22.
Assume current is process1, and it is a work thread.
cpu21 cpu22
p1:
....
cmci_rediscover()
|-set_cpus_allowed_ptr()
|-stop_one_cpu()
|-create a work to excute migration_cpu_stop()
|-wait_for_completion()
|-wait_for_common()
|-might_sleep()
Here, p1 gives up cpu21.
The work starts:
migration_cpu_stop()
|-migrate p1 to cpu22
On cpu22, p1 wakes up:
p1:
In wait_for_common()
|-do_wait_for_common()
|-schedule_timeout()
|-schedule()
|-__schedule()
|-try_to_wake_up_local()
|-wq_worker_sleeping()
|-BUG_ON(rq != this_rq())
On cpu22, wq_worker_sleeping() uses p1's worker_pool to find a worker
to go on to execute p1. But p1's worker_pool is on cpu21, and p1 is now
on cpu22. So the BUG_ON(rq != this_rq()) is triggered.
Thanks. :)
>
> -Tony
>
next prev parent reply other threads:[~2012-10-22 3:34 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-19 5:45 [PATCH v2 0/2] " Tang Chen
2012-10-19 5:45 ` [PATCH v2 1/2] Replace if statement with WARN_ON_ONCE() " Tang Chen
2012-10-19 14:07 ` Greg KH
2012-10-19 16:40 ` Borislav Petkov
2012-10-22 2:10 ` Tang Chen
2012-10-22 10:14 ` Borislav Petkov
2012-10-23 1:35 ` Tang Chen
2012-10-23 2:55 ` Tang Chen
2012-10-23 9:52 ` Borislav Petkov
2012-10-23 10:17 ` Miao Xie
2012-10-23 10:20 ` Borislav Petkov
2012-10-23 10:34 ` Miao Xie
2012-10-23 13:14 ` Borislav Petkov
2012-10-23 11:30 ` Tang Chen
2012-10-23 14:17 ` Borislav Petkov
2012-10-23 16:16 ` Luck, Tony
2012-10-24 1:31 ` Tang Chen
2012-10-19 5:45 ` [PATCH v2 2/2] Do not change worker's running cpu " Tang Chen
2012-10-19 16:42 ` Borislav Petkov
2012-10-19 17:21 ` Luck, Tony
2012-10-22 3:33 ` Tang Chen [this message]
2012-10-22 10:18 ` Borislav Petkov
2012-10-23 1:30 ` Tang Chen
2012-10-19 7:21 ` [PATCH v2 0/2] " Tang Chen
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=5084BE7C.4020303@cn.fujitsu.com \
--to=tangchen@cn.fujitsu.com \
--cc=bp@alien8.de \
--cc=bp@amd64.org \
--cc=hpa@zytor.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miaox@cn.fujitsu.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=wency@cn.fujitsu.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
Powered by JetHome