From: Huang Ying <ying.huang@intel.com>
To: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Andi Kleen <ak@linux.intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -v4] x86: MCE: Re-implement MCE log ring buffer as per-CPU ring buffer
Date: Fri, 05 Jun 2009 16:39:34 +0800 [thread overview]
Message-ID: <1244191174.8361.517.camel@yhuang-dev.sh.intel.com> (raw)
In-Reply-To: <4A28D738.8010202@jp.fujitsu.com>
On Fri, 2009-06-05 at 16:28 +0800, Hidetoshi Seto wrote:
> Huang Ying wrote:
> > On Fri, 2009-06-05 at 15:01 +0800, Hidetoshi Seto wrote:
> >> Huang Ying wrote:
> >>> struct mce_log {
> >>> - char signature[12]; /* "MACHINECHECK" */
> >>> + char signature[12]; /* "MACHINECHEC2" */
> >>> unsigned len; /* = MCE_LOG_LEN */
> >>> - unsigned next;
> >>> unsigned flags;
> >>> unsigned pad0;
> >>> - struct mce entry[MCE_LOG_LEN];
> >>> + struct mce_log_cpu *mcelog_cpus;
> >>> };
> >> What is this *mcelog_cpus to be used for?
> >> It seems it will point one of per-CPU buffers (maybe cpu#0's buffer)
> >> if I have read the following mce_log_init() correctly.
> >
> > It is mainly used by something like kdump, which can search
> > "MACHINECHEC2", and analyze mce_log. mcelog_cpus can help kdump find the
> > real mcelog storage.
>
> Hum, but it help tools only to find one of buffers, not to find all.
>
> I think it would be better help for tools if we have another signature
> on struct mce_log_cpu, e.g.:
>
> +struct mce_log_cpu {
> + char signature[**]; /* "MCE_LOG_CPU_VER_1" or so */
> + __u32 cpuid; /* cpuid or extcpu, same as struct mce */
> + int head;
> + int tail;
> + unsigned long flags;
> + struct mce entry[MCE_LOG_LEN];
> +};
>
> How about this?
+ mcelog.mcelog_cpus = &per_cpu_var(mce_log_cpus);
So mcelog.mcelog_cpus are pointed to the buffers of all CPUs, not just
that of one CPU. You can find them by analyzing PER cpu data structure.
Best Regards,
Huang Ying
next prev parent reply other threads:[~2009-06-05 8:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-04 3:11 Huang Ying
2009-06-04 5:56 ` Andi Kleen
2009-06-05 7:01 ` Hidetoshi Seto
2009-06-05 8:08 ` Huang Ying
2009-06-05 8:28 ` Hidetoshi Seto
2009-06-05 8:39 ` Huang Ying [this message]
2009-06-08 1:17 ` Hidetoshi Seto
2009-06-08 2:05 ` Huang Ying
2009-06-08 3:09 ` Hidetoshi Seto
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=1244191174.8361.517.camel@yhuang-dev.sh.intel.com \
--to=ying.huang@intel.com \
--cc=ak@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=tglx@linutronix.de \
/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®