[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87ldt24rk4.ffs@tglx>
Date: Tue, 18 Mar 2025 10:27:23 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave
Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org, Paolo Bonzini
<pbonzini@...hat.com>, linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
Jacob Pan <jacob.jun.pan@...ux.intel.com>, Jim Mattson
<jmattson@...gle.com>
Subject: Re: [PATCH 2/8] x86/irq: Track if IRQ was found in PIR during
initial loop (to load PIR vals)
On Mon, Mar 17 2025 at 09:53, Sean Christopherson wrote:
> On Mon, Mar 17, 2025, Thomas Gleixner wrote:
>> > - for (i = 0; i < 4; i++)
>> > + for (i = 0; i < 4; i++) {
>> > pir_copy[i] = READ_ONCE(pir[i]);
>> > + if (pir_copy[i])
>> > + found_irq = true;
>> > + }
>>
>> That's four extra conditional branches. You can avoid them completely. See
>> delta patch below.
>
> Huh. gcc elides the conditional branches when computing found_irq regardless of
> the approach; the JEs in the changelog are from skipping the XCHG.
>
> But clang-14 does not. I'll slot this in.
Neither does GCC 12. That's why I noticed.
Powered by blists - more mailing lists