lkml.org 
[lkml]   [2010]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] x86-64: software IRQ masking and handling

* Tejun Heo <tj@kernel.org> wrote:

> 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


\
 
 \ /
  Last update: 2010-07-11 21:29    [W:0.102 / U:1.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site