Re: [PATCH] local_irq_disable removal

Andi Kleen
2005-06-12T20:03:19Z

Daniel Walker <dwalker@mvista.com> writes:
>
> Interesting .. So "cli" takes 7 cycles , "sti" takes 7 cycles. The current
> method does "lea" which takes 1 cycle, and "or" which takes 1 cycle. I'm
> not sure if there is any function call overhead .. So the soft replacment
> of cli/sti is 70% faster on a per instruction level .. So it's at least
> not any slower .. Does everyone agree on that?

It depends on what CPU your are benchmarking on. On K7 and K8 cli and sti
are only two or three cycles.

-Andi