mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: "Huang Ying" <ying.huang@intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Andi Kleen" <ak@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Frédéric Weisbecker" <fweisbec@gmail.com>,
	"Steven Rostedt" <rostedt@goodmis.org>
Subject: Re: [RFC] x86, mce: use of TRACE_EVENT for mce
Date: Tue, 13 Oct 2009 10:43:24 +0200	[thread overview]
Message-ID: <20091013084324.GB9610@elte.hu> (raw)
In-Reply-To: <4AD42A0D.7050104@jp.fujitsu.com>


* Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> wrote:

> Ingo Molnar wrote:
> > * Huang Ying <ying.huang@intel.com> wrote:
> > 
> >> I have talked with Ingo about this patch. But he has different idea 
> >> about MCE log ring buffer and he didn't want to merge the patch even 
> >> as an urgent bug fixes. It seems that another re-post can not convince 
> >> him.
> > 
> > Correct. The fixes are beyond what we can do in .32 - and for .33 i 
> > outlined (with a patch) that we should be using not just the ftrace 
> > ring-buffer (like your patch did) but perf events to expose MCE events.
> > 
> > That brings MCE events to a whole new level of functionality.
> > 
> > Event injection support would be an interesting new addition to 
> > kernel/perf_event.c: non-MCE user-space wants to inject events as well - 
> > both to simulate rare events, and to define their own user-space events.
> > 
> > Is there any technical reason why we wouldnt want to take this far 
> > superior approach?
> > 
> > 	Ingo
> 
> We could have more aggressive discussion if there is a real patch. 
> This is an example.

That's the right attitude :-)

I've created a new topic tree for this approach: tip:perf/mce, and i've 
committed your patch with a changelog outlining the approach, and pushed 
it out. Please send delta patches against latest tip:master.

I think the next step should be to determine the rough 'event structure' 
we want to map out. The mce_record event you added should be split up 
some more.

For example we definitely want thermal events to be separate. One 
approach would be the RFC patch i sent in "[PATCH] x86: mce: New MCE 
logging design" - feel free to pick that up and iterate it.

A question would be whether each MCA/MCE bank should have a separate 
event enumerated. I.e. right now 'perf list' shows:

  mce:mce_record                             [Tracepoint event]

It might make sense to do something like:

  mce:mce_bank_2                             [Tracepoint event]
  mce:mce_bank_3                             [Tracepoint event]
  mce:mce_bank_5                             [Tracepoint event]
  mce:mce_bank_6                             [Tracepoint event]
  mce:mce_bank_8                             [Tracepoint event]

But this is pretty static and meaningless - so what i'd like to see is 
to enumerate the _logical purpose_ of the MCE events, largely driven by 
the physical source of the event:

  $ perf list 2>&1 | grep mce
  mce:mce_cpu                                [Tracepoint event]
  mce:mce_thermal                            [Tracepoint event]
  mce:mce_cache                              [Tracepoint event]
  mce:mce_memory                             [Tracepoint event]
  mce:mce_bus                                [Tracepoint event]
  mce:mce_device                             [Tracepoint event]
  mce:mce_other                              [Tracepoint event]

etc. - with a few simple rules about what type of event goes into which 
category, such as:

 - CPU internal errors go into mce_cpu
 - memory or L3 cache related errors go into mce_memory
 - L2 and lower level cache errors go into mce_cache
 - general IO / bus / interconnect errors go into mce_bus
 - specific device faults go into mce_device
 - the rest goes into mce_other

Note - this is just a first rough guesstimate list - more can be added 
and the definition can be made stricter. (Please suggest modifications 
to this categorization.) Each event still has finegrained fields that 
allows further disambiguation of precisely which event the CPU 
generated.

Note that these categories will be largely CPU independent. Certain 
models will offer events in all of these categories, some models will 
only provide events in a very limited subset of these events.

The logical structure remains CPU model independent and tools, admins 
and users can standardize on this generic 'logical overview' event 
structure - instead of the current maze of model specific MCE decoding 
with no real structure over it.

Once we have this higher level logging structure (while still preserving 
the fine details as well), we can go a step forward and attach things 
like the ability to panic the box to individual events.

[ Note, we might also still keep a 'generic' event like mce_record as
  well, if that still makes sense once we've split up the events
  properly. ]

Then the next step would be clean and generic event injection support 
that uses perf events.

Hm? Looks like pretty exciting stuff to me - there's a _lot_ of 
expressive potential in the hardware, we have myriads of interesting 
details that can be logged - we just need to free it up and make it 
available properly.

	Ingo

  reply	other threads:[~2009-10-13  8:44 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-28  1:21 [BUGFIX -v2] x86, mce, inject: Make injected mce valid only during faked handler call Huang Ying
2009-09-28  6:40 ` Hidetoshi Seto
2009-09-28  7:09   ` Huang Ying
2009-09-28  8:02     ` Hidetoshi Seto
2009-09-28  8:27       ` Huang Ying
2009-09-28  8:59         ` Hidetoshi Seto
2009-09-28  9:15           ` Huang Ying
2009-09-28  6:46 ` [PATCH 0/5] x86, mce-inject: misc fix Hidetoshi Seto
2009-09-28  6:51   ` [PATCH 1/5] mce-inject: replace MCJ_ to MCE_INJ_ Hidetoshi Seto
2009-09-28  6:51   ` [PATCH 2/5] x86, mce: rename finished to valid in struct mce Hidetoshi Seto
2009-09-28 18:24     ` Andi Kleen
2009-09-29  8:40       ` Hidetoshi Seto
2009-09-29 23:02         ` Andi Kleen
2009-09-29 23:04         ` [PATCH 2/5] x86, mce: rename finished to valid in struct mce II Andi Kleen
2009-09-29 23:20           ` H. Peter Anvin
2009-09-30  4:39             ` Andi Kleen
2009-10-01 11:08               ` Ingo Molnar
2009-09-28  6:52   ` [PATCH 3/5] mce-inject: make injected mce valid only during faked handler call Hidetoshi Seto
2009-09-28  7:27     ` Huang Ying
2009-09-28 18:50     ` Andi Kleen
2009-09-29  8:42       ` Hidetoshi Seto
2009-09-29 20:45         ` Andi Kleen
2009-09-28  6:53   ` [PATCH 4/5] mce-inject: no wait on write with MCE_INJ_CTX_RANDOM Hidetoshi Seto
2009-09-28  6:54   ` [PATCH 5/5] mce-inject: allow injecting status=0 to poll handler Hidetoshi Seto
2009-10-05  2:52 ` [PATCH 0/6] x86, mce, mce-inject: misc fix v2 Hidetoshi Seto
2009-10-05  3:05   ` [PATCH 1/6] x86, mce: replace MCJ_ to MCE_INJ_ Hidetoshi Seto
2009-10-05  3:06   ` [PATCH 2/6] x86, mce: replace MCM_ to MCI_MISC_ Hidetoshi Seto
2009-10-05  3:07   ` [PATCH 3/6] mce-inject: no wait on write with MCE_INJ_CTX_RANDOM Hidetoshi Seto
2009-10-05  3:07   ` [PATCH 4/6] mce-inject: allow injecting status=0 to poll handler Hidetoshi Seto
2009-10-05  3:08   ` [PATCH 5/6] mce-inject: add a barrier to raise_mce() Hidetoshi Seto
2009-10-05  3:10   ` [PATCH 6/6] mce-inject: use injected mce only during faked handler call Hidetoshi Seto
2009-10-09  1:54     ` Huang Ying
2009-10-09  5:38       ` Hidetoshi Seto
2009-10-09  5:44         ` [PATCH 1/4] mce-inject: make raise_global() Hidetoshi Seto
2009-10-09  5:45         ` [PATCH 2/4] mce-inject: use individual members instead of struct mce Hidetoshi Seto
2009-10-09  6:50           ` Huang Ying
2009-10-09  7:18             ` Hidetoshi Seto
2009-10-09  5:45         ` [PATCH 3/4] mce-inject: change msr_to_offset() to mce_get_fake_reg() Hidetoshi Seto
2009-10-09  5:46         ` [PATCH 4/4] mce-inject: support injecting multiple error to a CPU Hidetoshi Seto
2009-10-09  7:14     ` [PATCH 6/6] mce-inject: use injected mce only during faked handler call Huang Ying
2009-10-09  7:27       ` Hidetoshi Seto
2009-10-09  7:44         ` Huang Ying
2009-10-09  8:31           ` Hidetoshi Seto
2009-10-09  9:11             ` Huang Ying
2009-10-13  2:34               ` Hidetoshi Seto
2009-10-13  3:28                 ` Huang Ying
2009-10-13  6:00                   ` Hidetoshi Seto
2009-10-13  6:19                     ` Huang Ying
2009-10-13  6:29                       ` Ingo Molnar
2009-10-13  7:19                         ` [RFC] x86, mce: use of TRACE_EVENT for mce Hidetoshi Seto
2009-10-13  8:43                           ` Ingo Molnar [this message]
2009-10-13  8:46                           ` [tip:perf/mce] perf_event, x86, mce: Use TRACE_EVENT() for MCE logging tip-bot for 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=20091013084324.GB9610@elte.hu \
    --to=mingo@elte.hu \
    --cc=ak@linux.intel.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=seto.hidetoshi@jp.fujitsu.com \
    --cc=ying.huang@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

all inboxes | Powered by JetHome®