On Wed, Sep 28, 2011 at 12:31:40PM +0200, Robert Richter wrote:
> On 23.09.11 15:17:13, Don Zickus wrote:
> > @@ -89,6 +89,15 @@ static int notrace __kprobes nmi_handle(unsigned int type, struct pt_regs *regs)
> >
> > handled += a->handler(type, regs);
> >
> > + /*
> > + * Optimization: only loop once if this is not a
> > + * back-to-back NMI. The idea is nothing is dropped
> > + * on the first NMI, only on the second of a back-to-back
> > + * NMI. No need to waste cycles going through all the
> > + * handlers.
> > + */
> > + if (!b2b&& handled)
> > + break;
>
> I don't think we can leave this in. As said, there are cases that 2
> nmis trigger but the handler is called only once. Only the first would
> be handled then, and the second get lost cause there is no 2nd nmi
> call.
Right. Avi, Jeremy what was your objection that needed this optimization
in the first place?