From: "tj@kernel.org" <tj@kernel.org>
To: "songxiumiao@inspur.com" <songxiumiao@inspur.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
gongzhaogang <gongzhaogang@inspur.com>
Subject: Re: [PATCH] hotplug: fix oops when adding cpu.
Date: Wed, 17 Jun 2015 14:14:25 -0400 [thread overview]
Message-ID: <20150617181425.GG22637@mtj.duckdns.org> (raw)
In-Reply-To: <201506171804058879019@inspur.com>
Hello,
On Wed, Jun 17, 2015 at 06:04:06PM +0800, songxiumiao@inspur.com wrote:
> Subject: [PATCH] hotplug: fix oops when adding cpu
> From: SongXiumiao <songxiumiao@inspur.com>
>
> If memory is not in node0 and a cpu is logically hotadded, the kernel oopses.
>
> By analysing the bug function call trace,we find that create_worker function
> will alloc the memory from node0.Because node0 is offline,the allocation is
> failed.Then we add a condition to ensure the node is online and
> system can alloc memory from a node that is online.
>
> Here's the backtrace:
> [root@localhost ~]# echo 1 > /sys/devices/system/cpu/cpu90/online
...
> [ 225.755126] BUG: unable to handle kernel paging request at 0000000000001b08
> [ 225.762931] IP: [<ffffffff81182597>] __alloc_pages_nodemask+0xb7/0x940
> [ 225.770247] PGD 449bb0067 PUD 46110e067 PMD 0
> [ 225.775248] Oops: 0000 [#1] SMP
> [ 225.778875] Modules linked in: xt_CHECKSUM ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 ipt_REJECT nf_reject_ipv4 nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntracd
> [ 225.868198] CPU: 43 PID: 5400 Comm: bash Not tainted 4.0.0-rc4-bug-fixed-remove #16
> [ 225.876754] Hardware name: Insyde Brickland/Type2 - Board Product Name1, BIOS Brickland.05.04.15.0024 02/28/2015
> [ 225.888122] task: ffff88045a3d8da0 ti: ffff880446120000 task.ti: ffff880446120000
> [ 225.896484] RIP: 0010:[<ffffffff81182597>] [<ffffffff81182597>] __alloc_pages_nodemask+0xb7/0x940
...
> [ 226.002904] Call Trace:
> [ 226.019173] [<ffffffff811d3957>] new_slab+0xa7/0x460
> [ 226.024826] [<ffffffff81678c75>] __slab_alloc+0x310/0x470
> [ 226.043812] [<ffffffff811d46c1>] kmem_cache_alloc_node_trace+0x91/0x250
> [ 226.051299] [<ffffffff8108dd31>] alloc_worker+0x21/0x50
> [ 226.057236] [<ffffffff8108ff23>] create_worker+0x53/0x1e0
> [ 226.063357] [<ffffffff81092092>] alloc_unbound_pwq+0x2a2/0x510
> [ 226.069974] [<ffffffff810924b4>] wq_update_unbound_numa+0x1b4/0x220
> [ 226.077076] [<ffffffff81092828>] workqueue_cpu_up_callback+0x308/0x3d0
> [ 226.084468] [<ffffffff8109784e>] notifier_call_chain+0x4e/0x80
> [ 226.091084] [<ffffffff8109796e>] __raw_notifier_call_chain+0xe/0x10
> [ 226.098189] [<ffffffff810774f3>] cpu_notify+0x23/0x50
...
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index 586ad91..22d194c 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -3253,7 +3253,8 @@ static struct worker_pool *get_unbound_pool(const struct workqueue_attrs *attrs)
> if (wq_numa_enabled) {
> for_each_node(node) {
> if (cpumask_subset(pool->attrs->cpumask,
> - wq_numa_possible_cpumask[node])) {
> + wq_numa_possible_cpumask[node])
> + && node_online(node)) {
> pool->node = node;
> break;
Umm... can you please talk with the fujitsu guys? They're working on
the same problem and this isn't the full solution. What happens if
the node goes down after pool is initialized?
Thanks.
--
tejun
parent reply other threads:[~2015-06-17 18:14 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <201506171804058879019@inspur.com>]
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=20150617181425.GG22637@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=gongzhaogang@inspur.com \
--cc=linux-kernel@vger.kernel.org \
--cc=songxiumiao@inspur.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
all inboxes | Powered by JetHome®