Messages in this thread | | | Date | Sun, 11 Jul 2010 21:26:15 +0200 | From | Ingo Molnar <> | Subject | Re: [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
| |