From: Borislav Petkov <petkovbb@googlemail.com>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Doug Thompson <dougthompson@xmission.com>,
Borislav Petkov <borislav.petkov@amd.com>
Subject: Re: 2.6.32-rc8: amd64_edac slub error
Date: Mon, 30 Nov 2009 21:35:47 +0100 [thread overview]
Message-ID: <20091130203547.GA2838@liondog.tnic> (raw)
In-Reply-To: <4B1400B3.60300@oracle.com>
Hi Randy,
On Mon, Nov 30, 2009 at 09:28:19AM -0800, Randy Dunlap wrote:
> Loading amd64_edac_mod on an amd64 system without the expected hardware support
> causes memory usage error(s).
Well, this is new!
> Is this already fixed/patched? Do you need more info?
Nope :(.
I've tried to reproduce it here by selecting CONFIG_SLUB no success.
Please send me your config.
Also, it would be very helpful if you could enable CONFIG_EDAC_DEBUG and
run it again.
>From looking at the error trace, though, it looks like we're
not allocating enough memory for the struct msr things in
amd64_nb_mce_bank_enabled_on_node(). This is just a hunch though and you
could give the following debug patch a try:
---
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index a38831c..139bc14 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2739,8 +2739,10 @@ static void get_cpus_on_this_dct_cpumask(cpumask_t *mask, int nid)
int cpu;
for_each_online_cpu(cpu)
- if (amd_get_nb_id(cpu) == nid)
+ if (amd_get_nb_id(cpu) == nid) {
+ pr_err("%s: nid: %d, cpu: %d\n", __func__, nid, cpu);
cpumask_set_cpu(cpu, mask);
+ }
}
/* check MCG_CTL on all the cpus on this node */
@@ -2755,6 +2757,8 @@ static bool amd64_nb_mce_bank_enabled_on_node(int nid)
get_cpus_on_this_dct_cpumask(&mask, nid);
+ pr_err("%s: weight: %d\n", __func__, cpumask_weight(&mask));
+
msrs = kzalloc(sizeof(struct msr) * cpumask_weight(&mask), GFP_KERNEL);
if (!msrs) {
amd64_printk(KERN_WARNING, "%s: error allocating msrs\n",
--
PS. I'm travelling till the end of the week and won't have constant
access to mail but I'll do my best to fix this, sorry.
Thanks.
--
Regards/Gruss,
Boris.
next prev parent reply other threads:[~2009-11-30 20:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 17:28 Randy Dunlap
2009-11-30 20:35 ` Borislav Petkov [this message]
2009-11-30 21:29 ` Randy Dunlap
2009-11-30 22:16 ` Randy Dunlap
2009-12-01 15:16 ` Borislav Petkov
2009-12-01 17:19 ` Randy Dunlap
2009-12-02 10:58 ` Borislav Petkov
2009-12-02 18:11 ` Randy Dunlap
2009-12-02 22:12 ` Doug Thompson
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=20091130203547.GA2838@liondog.tnic \
--to=petkovbb@googlemail.com \
--cc=borislav.petkov@amd.com \
--cc=dougthompson@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.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®