Re: perf, ftrace and MCEs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Borislav Petkov
Date: Sunday, May 16, 2010 - 9:51 am

From: Ingo Molnar <mingo@elte.hu>
Date: Sun, May 16, 2010 at 01:26:41PM +0200

Hi,


The decoded string handling is still clumsy since it is of variable
length and I have to allocate a string of the maximal possible length of
any error for it to not get truncated.

We could avoid this by spitting error codes of fixed length, instead,
which the RAS daemon would map to strings in userspace but the coding
scheme would need some thinking so that it works adequately for all
possible error types.

Anyway, we can always improve this if needed and as we go...


Yep, sounds neat.


[snip]

My only concern here is that going over the perf events and callbacks
adds unnecessary additional code when we're in emergency mode handling
an uncorrectable error. However, I don't know how much that code would
be and whether its overhead would be relevant or not...


Correct me if I'm wrong but since the trace_mce_record() is a
tracepoint, we don't want to register callbacks over the perf_event*
interface but rather use the ftrace path, like Steven's example with
register_trace_sched_switch().

If we do it this way, there's no overhead at all and we add all
the needed functionality like tty switching and emergency shutdown
preparations to the proper path in the proper order - right after having
decoded the MCE and still in the NMI context of do_machine_check, i.e.
at the earliest possible moment and without wasting time.

And with tracepoints we still have the event unification/enumeration you
mention below so I think it can't get any better than that :).


see above.


Well, since MCEs are per CPU, the proper way to map those would be

/sys/devices/system/cpu/cpuX/events/mce/

With this, we could have the additional functionality to disable some
MCEs per CPU if it makes sense for certain cases...

Hmm?


Well, both mce and edac are a subset of RAS so calling it perf/ras/ is
the most sensible way to go IMHO. Also, this is where the perf inject
can be reused since we can inject true hardware errors and not only
simulate them in software.


ditto, 'perf ras' is what I'm thinking.

Thanks.

-- 
Regards/Gruss,
    Boris.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
perf, ftrace and MCEs, Borislav Petkov, (Sat May 1, 11:12 am)
Re: perf, ftrace and MCEs, Steven Rostedt, (Mon May 3, 7:41 am)
Re: perf, ftrace and MCEs, Borislav Petkov, (Mon May 3, 2:20 pm)
Re: perf, ftrace and MCEs, Andi Kleen, (Tue May 4, 3:15 am)
Re: perf, ftrace and MCEs, Ingo Molnar, (Tue May 4, 4:32 am)
Re: perf, ftrace and MCEs, Borislav Petkov, (Sat May 15, 6:43 am)
Re: perf, ftrace and MCEs, Ingo Molnar, (Sun May 16, 4:26 am)
Re: perf, ftrace and MCEs, Borislav Petkov, (Sun May 16, 9:51 am)