Re: x86/mce merge, integration hickup + crash, design thoughts

From: Andi Kleen
Date: Tue Dec 30 2008 - 04:13:32 EST



this reminds me, i dont particularly like the way you added a self-interrupt:

+ __send_IPI_shortcut(APIC_DEST_SELF, MCE_SELF_VECTOR, 0);

IPI self-sends are generally more fragile than task-flag based methods, and they also waste IRQ vector real-estate.

I believe the self IPI method is superior than going through the idle
notifiers using TIF flags as it was done before.

There's no guarantee idle (or other tif checkers like syscall return)
runs anytime soon after the event. They do usually, but it's not guaranteed.
And at least in the tolerant==3 case it's pretty important
to run this code ASAP.

It also is slightly cleaner code IMHO and better expresses the semantics
(execute as soon as the interrupts are on again) the code wants.
Admittedly temporarily it merging slightly harder, but that should
be only a temporary issue.

The original reason I did it this way was because 32bit didn't have
them (but I think that's obsolete now, 32bit needs them now too
for the idle power management code)

The other rationale was also that with everything moving to per CPU
interrupt spaces vectors are not as precious as they used to be, so
it's ok to use more.

And I'm not aware of a fundamental unreliability of self IPI.
After all the IRQ migration code already relies on it.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/