[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240813031522.4544-1-qiuxu.zhuo@intel.com>
Date: Tue, 13 Aug 2024 11:15:22 +0800
From: Qiuxu Zhuo <qiuxu.zhuo@...el.com>
To: tglx@...utronix.de
Cc: linux-kernel@...r.kernel.org,
torvalds@...ux-foundation.org,
x86@...nel.org,
qiuxu.zhuo@...el.com
Subject: Re: [GIT pull] x86/urgent for v6.11-rc3
> From: Thomas Gleixner <tglx@...utronix.de>
> To: Linus Torvalds <torvalds@...ux-foundation.org>
> Cc: linux-kernel@...r.kernel.org, x86@...nel.org
> Subject: Re: [GIT pull] x86/urgent for v6.11-rc3
>
> On Sun, Aug 11 2024 at 11:07, Linus Torvalds wrote:
> [...]
> > So i think that static_branch_likely() should have been changed to a
> > static_branch_unlikely() too, but it's possible that I've just
> > confused myself.
>
> You are right. It creates a branch for the !virt_lock case.
>
> > Anyway, somebody should double-check me.
> >
> > 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.
Thanks!
-Qiuxu
Powered by blists - more mailing lists