From: Andi Kleen <andi@firstfloor.org>
To: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"mingo@elte.hu" <mingo@elte.hu>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"hpa@zytor.com" <hpa@zytor.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [2/4] x86: MCE: Implement dynamic machine check banks support v5
Date: Thu, 12 Feb 2009 22:25:11 +0100 [thread overview]
Message-ID: <20090212212511.GB2486@one.firstfloor.org> (raw)
In-Reply-To: <1234461785.4286.1918.camel@localhost.localdomain>
> Do we need a per cpu count of # of banks to handle one CPU having less
> banks than others case?
> Specifically, I am thinking of sequence:
> - CPU 0 has n banks
> - CPU 0 does below
> for (i = 0; i < banks; i++) {
> err = sysdev_create_file(&per_cpu(device_mce, cpu),
> &bank_attrs[i]);
> - CPU 1, which comes online later, has say n-2 banks. So, banks now becomes n-2.
> - Now whenever CPU 0 does sysdev_remove_file loop below, it will do it only for n-2 banks.
True, that would be a leak without per cpu banks count. Perhaps should take
it out, this is really not supposed to happen anyways. I'm sure
more things would break with an asymetric CPU configuration.
An alternative would be to figure out how to walk the sysfs data
structures for this, but that would be really too much effort
for something that shouldn't happen.
I think I'll just add a WARN_ON() for this case instead.
-Andi
next prev parent reply other threads:[~2009-02-12 21:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-12 12:43 [PATCH] [0/4] x86: MCE: Cleanups series Andi Kleen
2009-02-12 12:43 ` [PATCH] [1/4] x86: MCE: Enable machine checks in 64bit defconfig Andi Kleen
2009-02-12 12:43 ` [PATCH] [2/4] x86: MCE: Implement dynamic machine check banks support v5 Andi Kleen
2009-02-12 18:03 ` Pallipadi, Venkatesh
2009-02-12 21:25 ` Andi Kleen [this message]
2009-02-17 22:07 ` [PATCH] x86: MCE: Implement dynamic machine check banks support v6 Andi Kleen
2009-02-12 12:43 ` [PATCH] [3/4] x86: MCE: Factor out duplicated struct mce setup code into a single function Andi Kleen
2009-02-12 12:43 ` [PATCH] [4/4] x86: MCE: Separate correct machine check poller and fatal exception handler v2 Andi Kleen
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=20090212212511.GB2486@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=venkatesh.pallipadi@intel.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