[lkml]   [2015]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH] x86/asm/irq: Don't use POPF but STI
On Tue, Apr 21, 2015 at 9:12 AM, Linus Torvalds
<> wrote:
> On Tue, Apr 21, 2015 at 5:45 AM, Ingo Molnar <> wrote:
>> Totally untested and not signed off yet: because we'd first have to
>> make sure (via irq flags debugging) that it's not used in reverse, to
>> re-disable interrupts:
> Not only might that happen in some place, I *really* doubt that a
> conditional 'sti' is actually any faster. The only way it's going to
> be measurably faster is if you run some microbenchmark so that the
> code is hot and the branch predicts well.
> "popf" is fast for the "no changes to IF" case, and is a smaller
> instruction anyway. I'd really hate to make this any more complex
> unless somebody has some real numbers for performance improvement
> (that is *not* just some cycle timing from a bogus test-case, but real
> measurements on a real load).
> And even *with* real measurements, I'd worry about the "use popf to
> clear IF" case.

Fair enough. Maybe I'll benchmark this some day.


> Linus

Andy Lutomirski
AMA Capital Management, LLC

 \ /
  Last update: 2015-04-22 01:01    [W:0.068 / U:1.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site