Re: [GIT pull] x86/urgent for v6.11-rc3

From: Thomas Gleixner
Date: Tue Aug 13 2024 - 13:33:12 EST


On Tue, Aug 13 2024 at 11:15, Qiuxu Zhuo wrote:
>> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>> On Sun, Aug 11 2024 at 11:07, Linus Torvalds wrote:
>> > I doubt it actually matters, since I think this all is fundamentally
>> > just in the slow-path, so the "do a branch or a no-op" is likely
>> > entirely in the noise even if I followed the code right. But it looked
>> > off to me.
>>
>> It is off and yes it won't matter much in the slowpath maze.
>
> static_branch_unlikely() matches that 'virt_spin_lock_key' is set to false
> in default after the commit,
>
> e639222a5119 ("x86/paravirt: Fix incorrect virt spinlock setting on bare metal")
>
> although it offers little performance benefit since it is in the slow path.
>
> Thomas, do you think it's worth making a patch to convert static_branch_likely()
> to static_branch_unlikely() for this check, as suggested by Linus?
> If so, I can assist with this.

Sure, but I'm not so sure that it actually matters and makes a
measurable difference.

Thanks,

tglx