* Tejun Heo <tj@kernel.org> wrote:
quoted text > Hello,
>
> This is something suggested by Rusty Russell a while ago. It makes IRQ
> masking a software switch like preemption or softirq enable/disable.
> Hardware interrupt masking (cli/sti) and delivery are decoupled from actual
> IRQ handling. IRQ disabling is done by single instruction moving 1 to a
> percpu variable. Enabling is similar but it should check whether there's
> any pending interrupt to handle.
>
> This change greatly reduces the number of hardware IRQ masking
> manipulations. cli/sti still being somewhat costly operations (I hear
> nehalem is better tho), this should be able to improve overall performance,
> especially on paravirts.
Not just Nehalem but on various AMD CPUs it was in the below-10-cycles range
for years.
Note that we tried this in -rt, but the pain and trouble (and, often, code
bloat) was not worth the trouble. The PUSHF/POPF/CLI/STI instructions are
really simple and short in the instruction stream - without disturbing other
registers.
Ingo
--
unsubscribe notice 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/
Messages in current thread:
Re: [RFC PATCH] x86-64: software IRQ masking and handling , Ingo Molnar , (Sun Jul 11, 12:26 pm)