From: Thomas Gleixner <tglx@linutronix.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [GIT pull] x86/urgent for v6.11-rc3
Date: Mon, 12 Aug 2024 10:21:05 +0200 [thread overview]
Message-ID: <87le12rw26.ffs@tglx> (raw)
In-Reply-To: <CAHk-=wjasZbABR14SFRgkL8MZxP+X4qBUOUM3c97cL5gXuwrUQ@mail.gmail.com>
On Sun, Aug 11 2024 at 11:07, Linus Torvalds wrote:
> On Sun, 11 Aug 2024 at 06:58, Thomas Gleixner <tglx@linutronix.de> wrote:
> Our static key code is pretty confusing, but we basically have
>
> - virt_spin_lock_key is now a "struct static_key_false", which means
> that we consider the virt case the unlikely case.
>
> I agree whole-heartedly, because it's going to be the slow case
> anyway, so this is good.
>
> - that means that 'static_branch_likely()' will generate a branch
> (because the key is marked unlikely0
>
> Isn't this wrong? So instead of falling through to the native
> qspinlock case, we will branch to it, and we fall through to the
> virt-spinlock case?
>
> 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.
Thanks
tglx
next prev parent reply other threads:[~2024-08-12 8:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-11 13:58 [GIT pull] irq/urgent for v6.11-rc3 Thomas Gleixner
2024-08-11 13:58 ` [GIT pull] timers/urgent " Thomas Gleixner
2024-08-11 18:22 ` pr-tracker-bot
2024-08-11 13:58 ` [GIT pull] x86/urgent " Thomas Gleixner
2024-08-11 17:30 ` Linus Torvalds
2024-08-12 8:04 ` Thomas Gleixner
2024-08-11 18:07 ` Linus Torvalds
2024-08-12 8:21 ` Thomas Gleixner [this message]
2024-08-13 3:15 ` Qiuxu Zhuo
2024-08-13 17:33 ` Thomas Gleixner
2024-08-14 3:14 ` [PATCH 1/1] x86/paravirt: Use static_branch_unlikely() for virt_spin_lock_key test Qiuxu Zhuo
2024-08-11 18:22 ` [GIT pull] x86/urgent for v6.11-rc3 pr-tracker-bot
2024-08-11 18:22 ` [GIT pull] irq/urgent " pr-tracker-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87le12rw26.ffs@tglx \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.