lkml.org 
[lkml]   [2011]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/9] HWPoison: add memory_failure_queue()

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

> (2011/05/22 19:00), Ingo Molnar wrote:
> > * huang ying <huang.ying.caritas@gmail.com> wrote:
> >> How to do hardware error recovering in your perf framework? IMHO, it can be
> >> something as follow:
> >>
> >> - NMI handler run for the hardware error, where hardware error
> >> information is collected and put into a ring buffer, an irq_work is
> >> triggered for further work
> >> - In irq_work handler, memory_failure_queue() is called to do the real
> >> recovering work for recoverable memory error in ring buffer.
> >>
> >> What's your idea about hardware error recovering in perf?
> >
> > The first step, the whole irq_work and ring buffer already looks largely
> > duplicated: you can collect into a perf event ring-buffer from NMI context like
> > the regular perf events do.
> >
> > The generalization that *would* make sense is not at the irq_work level really,
> > instead we could generalize a 'struct event' for kernel internal producers and
> > consumers of events that have no explicit PMU connection.
> >
> > This new 'struct event' would be slimmer and would only contain the fields and
> > features that generic event consumers and producers need. Tracing events could
> > be updated to use these kinds of slimmer events.
> >
> > It would still plug nicely into existing event ABIs, would work with event
> > filters, etc. so the tooling side would remain focused and unified.
> >
> > Something like that. It is rather clear by now that splitting out irq_work was
> > a mistake. But mistakes can be fixed and some really nice code could come out
> > of it! Would you be interested in looking into this?
>
> Err...?
>
> Then is it better to write some nice code and throw away the following patch?

No, i think your patch is already a pretty nice simplification of the
MCE code - using irq_work is obviously better than the open-coded MCE
vector approach!

These are exactly the kind of small steps towards generalizations
that i wanted to see: each step without being intrusive and breaking
stuff and working towards improving the status quo.

Thanks,

Ingo


\
 
 \ /
  Last update: 2011-05-25 16:13    [W:0.097 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site