From: Russ Anderson <rja@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] New way of storing MCA/INIT logs
Date: Mon, 10 Mar 2008 21:10:31 +0000 [thread overview]
Message-ID: <20080310211030.GB8678@sgi.com> (raw)
In-Reply-To: <47CD8142.7050207@bull.net>
On Thu, Mar 06, 2008 at 11:24:06AM +0100, Zoltan Menyhart wrote:
> Russ Anderson wrote:
>
> >I have a test case that creates that scenario. With your patch and only
> >one of the MCAs (at most) end up getting logged in
> >/var/log/salinfo/decoded .
>
> Can you describe, please, what your test does and what is the
> expected behavior of the MCA layer?
The test process allocates memory, injects an uncorrectable error,
forks a child, then both processes consume the bad data, with
the effect of two processes going into OS_MCA at the same time.
With the old code a total of four MCA records get logged.
(Overkill, an opportunity for improvement.) Each cpu that went
through MCA logs the error twice, with one of the records being
marked recovered (each pair of records are otherwise identical).
With the new code the first MCA is reported as occuring on cpu 0
when it occured on cpu 1. I think it is due to this code in
arch/ia64/kernel/salinfo.c:
-------------------------------------------------------------
n = data->cpu_check;
// printk("CPU %d: %s(): data->cpu_check: %d, data->cpu_event: %016lx\n", smp_processor_id(),
// __func__, n, data->cpu_event.bits[0]); // :-)
if (atomic_read(&ia64_MCA_logs._b_cnt) > 0 || atomic_read(&ia64_INIT_logs._b_cnt) >
0){
// printk("cpu %d %d %d\n", cpu, atomic_read(&ia64_MCA_logs._b_cnt), atomic_read(&ia64_INIT_logs._b_cnt));
cpu = any_online_cpu(cpu_online_map);
} else {
for (i = 0; i < NR_CPUS; i++) {
if (cpu_isset(n, data->cpu_event)) {
if (!cpu_online(n)) {
cpu_clear(n, data->cpu_event);
continue;
}
cpu = n;
break;
}
if (++n = NR_CPUS)
n = 0;
}
if (cpu = -1)
goto retry;
ia64_mlogbuf_dump();
/* for next read, start checking at next CPU */
data->cpu_check = cpu;
if (++data->cpu_check = NR_CPUS)
data->cpu_check = 0;
}
snprintf(cmd, sizeof(cmd), "read %d\n", cpu);
-------------------------------------------------------------
This line
cpu = any_online_cpu(cpu_online_map);
returns 0, so the MCA gets marked as being on cpu 0 instead
of the actual cpu (cpu 1).
> Another idea: the integration into the salinfo side in not yet quit smooth,
> :-)
Understood.
> it is the polling that fetches the logs one by one. Please leave 3 periods
> for the polling to see all the logs.
--
Russ Anderson, OS RAS/Partitioning Project Lead
SGI - Silicon Graphics Inc rja@sgi.com
next prev parent reply other threads:[~2008-03-10 21:10 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-04 17:05 [PATCH] New way of storing MCA/INIT logs Zoltan Menyhart
2008-03-05 0:23 ` Russ Anderson
2008-03-05 13:14 ` Zoltan Menyhart
2008-03-05 16:59 ` Luck, Tony
2008-03-05 18:56 ` Russ Anderson
2008-03-05 23:38 ` Keith Owens
2008-03-06 10:24 ` Zoltan Menyhart
2008-03-06 13:14 ` Zoltan Menyhart
2008-03-06 17:09 ` Luck, Tony
2008-03-06 17:29 ` Zoltan Menyhart
2008-03-06 17:52 ` Russ Anderson
2008-03-06 21:56 ` Luck, Tony
2008-03-06 22:13 ` Russ Anderson
2008-03-07 12:02 ` Zoltan Menyhart
2008-03-07 16:55 ` Russ Anderson
2008-03-10 9:36 ` Zoltan Menyhart
2008-03-10 20:36 ` Russ Anderson
2008-03-10 21:10 ` Russ Anderson [this message]
2008-03-11 14:07 ` Zoltan Menyhart
2008-03-11 14:32 ` Robin Holt
2008-03-11 21:22 ` Russ Anderson
2008-03-12 1:08 ` Keith Owens
2008-03-12 7:42 ` Zoltan Menyhart
2008-04-01 15:18 ` [PATCH] New way of storing MCA/INIT logs - take 2 Zoltan Menyhart
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=20080310211030.GB8678@sgi.com \
--to=rja@sgi.com \
--cc=linux-ia64@vger.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