Re: [PATCH] local_irq_disable removal

Ingo Molnar
2005-06-12T19:30:57Z

* Zwane Mwaikambo <zwane@fsmlabs.com> wrote:

> > 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?
>
> Well you also have to take into account the memory access, so it's not
> always that straightforward.

preempt_count resides in the first cacheline of 'current thread info'
and is almost always cached. It's the same cacheline that 'current',
'smp_processor_id()' are using.

Ingo