Messages in this thread | | | Date | Wed, 14 Feb 2001 13:29:16 +0100 (MET) | From | "Maciej W. Rozycki" <> | Subject | Re: [patch] 2.4.1, 2.4.2-pre3: APIC lockups |
| |
On Wed, 14 Feb 2001, Andrew Morton wrote:
> Tell me, please: what tradeoffs are involved in this patch? > Obviously it works around a pretty fatal problem, but > what are we giving away?
The change decreases performance a bit. For well-behaved systems the loss is fifteen instructions: a local APIC read (uncached but supposedly cheap), a global memory read (a cache line invalidation and fetch), seven stack accesses (cached for sure), a taken branch and five ALU. With the version you have I see gcc is actually doing an extra memory read due to the volatile APIC access presumably -- this is now fixed.
For misdelivered interrupts the overhead is much, much bigger, involving acquiring a spinlock and multiple (uncached and possibly slow) I/O APIC accesses. We may lower the overhead by undefining APIC_LOCKUP_DEBUG, which we should do after a bit of testing. I think we might leave APIC_MISMATCH_DEBUG intact -- its cost is a single locked instruction which is negligible IMO.
Note the original version consisted of two instructions only -- a local APIC write and "ret", sigh...
Maciej
-- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available +
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |