From: Borislav Petkov <bp@alien8.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "Chen, Gong" <gong.chen@linux.intel.com>,
tony.luck@intel.com, m.chehab@samsung.com,
linux-acpi@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/7 v6] trace, RAS: Add eMCA trace event interface
Date: Wed, 28 May 2014 18:34:52 +0200 [thread overview]
Message-ID: <20140528163452.GF17196@pd.tnic> (raw)
In-Reply-To: <20140528112832.5f83c66b@gandalf.local.home>
On Wed, May 28, 2014 at 11:28:32AM -0400, Steven Rostedt wrote:
> > +static void __trace_mem_error(const uuid_le *fru_id, char *fru_text,
> > + u32 err_number, u8 severity,
> > + struct cper_sec_mem_err *mem)
> > +{
> > + u8 etype = ~0, pa_mask_lsb = ~0;
> > + u64 pa = ~0ull;
> > +
> > + if (mem->validation_bits & CPER_MEM_VALID_ERROR_TYPE)
> > + etype = mem->error_type;
> > +
> > + if (mem->validation_bits & CPER_MEM_VALID_PA)
> > + pa = mem->physical_addr;
> > +
> > + if (mem->validation_bits & CPER_MEM_VALID_PA_MASK)
> > + pa_mask_lsb = (u8)__ffs64(mem->physical_addr_mask);
> > +
> > + memset(mem_location, 0, CPER_REC_LEN);
> > + cper_mem_err_location(mem, mem_location);
> > + memset(dimm_location, 0, CPER_REC_LEN);
> > + cper_dimm_err_location(mem, dimm_location);
> > + trace_extlog_mem_event(err_number, etype, severity, pa, pa_mask_lsb,
> > + fru_id, dimm_location, mem_location, fru_text);
>
> This seems like a lot of work for a tracepoint. Why all the strings?
> Ideally, you want to record in the fast path the minimum raw data and
> reconstruct it at the time it is read.
Well, they're constructed from a bunch of values which are checked for
validity first:
http://lkml.kernel.org/r/1400142646-10127-4-git-send-email-gong.chen@linux.intel.com
We probably could get rid of the fru* things by reading them out from
ACPI and enumerating them and issuing only an index here which the slow
path decodes.
The others we can split into fields again which should definitely make
the record smaller. Fields are defined in struct cper_sec_mem_err.
The thing is, this TP needs to be designed properly before we expose it
to the world and so that hoperfully most future uses are covered.
Thanks.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
next prev parent reply other threads:[~2014-05-28 16:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1400142646-10127-1-git-send-email-gong.chen@linux.intel.com>
[not found] ` <1401247938-22125-1-git-send-email-gong.chen@linux.intel.com>
[not found] ` <1401247938-22125-2-git-send-email-gong.chen@linux.intel.com>
2014-05-28 15:28 ` [PATCH 5/7 v6] trace, RAS: Add eMCA trace event interface Steven Rostedt
2014-05-28 16:34 ` Borislav Petkov [this message]
2014-05-28 16:56 ` Steven Rostedt
2014-05-29 7:43 ` Chen, Gong
2014-05-29 10:35 ` Borislav Petkov
2014-05-29 13:12 ` Steven Rostedt
2014-05-30 2:56 ` Chen, Gong
2014-05-30 9:22 ` Chen, Gong
2014-05-30 10:07 ` Borislav Petkov
2014-05-30 21:16 ` Tony Luck
2014-05-30 21:26 ` Borislav Petkov
2014-05-30 23:03 ` Luck, Tony
2014-05-31 1:07 ` Steven Rostedt
2014-06-02 16:22 ` Luck, Tony
2014-06-02 16:57 ` Steven Rostedt
2014-06-03 8:36 ` Chen, Gong
2014-06-03 14:35 ` Steven Rostedt
2014-06-04 18:32 ` Steven Rostedt
2014-06-06 6:51 ` Chen, Gong
2014-06-06 15:21 ` Steven Rostedt
2014-06-09 1:10 ` Chen, Gong
2014-06-09 10:22 ` 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=20140528163452.GF17196@pd.tnic \
--to=bp@alien8.de \
--cc=gong.chen@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=rostedt@goodmis.org \
--cc=tony.luck@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