lkml.org 
[lkml]   [2005]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] local_irq_disable removal
On Sun, 12 Jun 2005, Ingo Molnar wrote:

>
> * Thomas Gleixner <tglx@linutronix.de> wrote:
>
> > On Sat, 2005-06-11 at 13:51 -0700, Daniel Walker wrote:
> > > On Sat, 11 Jun 2005, Ingo Molnar 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?
> >
> > No, because x86 is not the whole universe
>
> x86 is actually a 'worst-case', because it has one of the cheapest CPU
> level cli/sti implementations. Usually it's the hard-local_irq_disable()
> overhead on non-x86 platforms that is a problem. (ARM iirc) So in this
> sense the soft-flag should be a win on most sane architectures.
>
> Ingo

I am surprised that is should actually be faster, but I give in to the
experts. I will see if I can find time to perform a test or I should spend
it on something else.

That said, this long discussion have not been a complete waste of time: I
think this thread have learned us that we do have different goals and
clarifies stuff.

I am not happy about the soft-irq thing. Mostly due to naming.
local_irq_disable() is really just preempt_disable() with some extra stuff
to make it backward combatible.
I still believe local_irq_disable() (also in the soft version) should be
completely forbidden when PREEMPT_RT is set. All places using it should be
replaced with a mutex or a ???_local_irq_disable() to mark that the code
have been reviewed for PREEMPT_RT. With your argument above
???_local_irq_disable() should really be preempt_disable() as that is
faster.

Esben

-
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/

\
 
 \ /
  Last update: 2005-06-12 13:19    [W:0.136 / U:2.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site