[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALCETrVzY2vdTcMMbA9w+0AEG0jbRfRhNdO1ta9jwK6_DR=99Q@mail.gmail.com>
Date: Tue, 21 Apr 2015 15:39:59 -0700
From: Andy Lutomirski <luto@...capital.net>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Ingo Molnar <mingo@...nel.org>, Andy Lutomirski <luto@...nel.org>,
Andrew Cooper <andrew.cooper3@...rix.com>,
Xen-devel <xen-devel@...ts.xen.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
"the arch/x86 maintainers" <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
David Vrabel <david.vrabel@...rix.com>,
Rusty Russell <rusty@...tcorp.com.au>, lguest@...ts.ozlabs.org,
Denys Vlasenko <vda.linux@...glemail.com>,
Borislav Petkov <bp@...en8.de>
Subject: Re: [RFC PATCH] x86/asm/irq: Don't use POPF but STI
On Tue, Apr 21, 2015 at 9:12 AM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> On Tue, Apr 21, 2015 at 5:45 AM, Ingo Molnar <mingo@...nel.org> 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.
--Andy
>
> Linus
--
Andy Lutomirski
AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists