From: Borislav Petkov <bp@amd64.org>
To: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Borislav Petkov <bp@amd64.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] x86, mce: Add persistent MCE event
Date: Thu, 22 Mar 2012 12:40:51 +0100 [thread overview]
Message-ID: <20120322114051.GB30026@aftab> (raw)
In-Reply-To: <4F6AE48D.4070508@linux.vnet.ibm.com>
On Thu, Mar 22, 2012 at 02:06:29PM +0530, Srivatsa S. Bhat wrote:
> > +err_unwind:
> > + err = -EINVAL;
> > + for (--cpu; cpu >= 0; cpu--)
> > + perf_rm_persistent_on_cpu(cpu, &per_cpu(mce_ev, cpu));
> > +
>
>
> *Totally* theoretical question: How do you know that the cpu_online_mask isn't
> sparse? In other words, what if some CPUs weren't booted? Then this for-loop
> wouldn't be very good..
>
> Oh, now I see that perf_rm_persistent_on_cpu() probably handles that case well..
> So no issues I guess.. ?
Right, this could theoretically come around to bite us in some obscure
cases, so we probably fix it from the get-go.
> (Moreover, we will probably have bigger issues at hand if some CPU didn't
> boot..)
>
> (The code looked funny, so I thought of pointing it out, whether or not it
> actually is worrisome. Sorry for the noise, if any).
Right, no, thanks for pointing it out.
I'll probably do something like the following:
for (--cpu; cpu >= 0; cpu--)
if (cpu_online(cpu))
perf_rm_persistent_on_cpu(cpu, &per_cpu(mce_ev, cpu));
to be on the safe side from that perspective.
Thanks.
--
Regards/Gruss,
Boris.
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
next prev parent reply other threads:[~2012-03-22 11:40 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 14:34 [RFC PATCH 0/2] perf: Add persistent event facilities Borislav Petkov
2012-03-21 14:34 ` [PATCH 1/2] " Borislav Petkov
2012-05-18 9:58 ` Peter Zijlstra
2012-05-18 10:01 ` Borislav Petkov
2012-05-18 10:00 ` Peter Zijlstra
2012-05-18 10:02 ` Peter Zijlstra
2012-05-18 10:09 ` Peter Zijlstra
2012-05-18 10:49 ` Borislav Petkov
2012-05-18 10:14 ` Peter Zijlstra
2012-05-18 11:03 ` Borislav Petkov
2012-05-18 11:24 ` Peter Zijlstra
2012-05-18 11:59 ` Ingo Molnar
2012-05-18 12:55 ` Borislav Petkov
2012-05-18 13:37 ` Peter Zijlstra
2012-05-18 14:09 ` Borislav Petkov
2012-05-18 14:14 ` Peter Zijlstra
2012-05-18 14:21 ` Borislav Petkov
2012-05-18 14:37 ` Peter Zijlstra
2012-05-18 15:24 ` Borislav Petkov
2012-05-31 17:33 ` Borislav Petkov
2012-03-21 14:34 ` [PATCH 2/2] x86, mce: Add persistent MCE event Borislav Petkov
2012-03-22 8:36 ` Srivatsa S. Bhat
2012-03-22 11:40 ` Borislav Petkov [this message]
2012-03-22 11:57 ` Srivatsa S. Bhat
2012-03-23 12:31 ` Ingo Molnar
2012-03-23 13:30 ` Borislav Petkov
2012-03-24 7:37 ` Ingo Molnar
2012-03-24 9:00 ` Borislav Petkov
2012-03-24 9:15 ` Ingo Molnar
2012-05-15 15:32 ` Borislav Petkov
2012-05-18 8:18 ` Ingo Molnar
2012-05-18 10:03 ` Borislav Petkov
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=20120322114051.GB30026@aftab \
--to=bp@amd64.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=srivatsa.bhat@linux.vnet.ibm.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®