> Here are some numbers:
> Which come from insmod of the below two modules. I didn't test writing to
> the stack register, but I expect it's similarly expensive as it affects the
> call return stack and other behind the scenes dependancies. Suffice it to
> say that reading %cr2 is essentially free on my box (athlon mp). Maybe
> we should use it as a pointer into a per-cpu area to avoid writing it?
If this is done, it should perhaps be done on only on certain x86s,
as some show the results go the other way. For example, the Cyrix III..
read stk best: 42 av: 42.60
read cr2 best: 61 av: 61.28
regards,
Dave.
-- | Dave Jones. http://www.codemonkey.org.uk | SuSE Labs- 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/