From: Josh Poimboeuf <jpoimboe@kernel.org>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Jason Baron <jbaron@akamai.com>,
Alice Ryhl <aliceryhl@google.com>,
Thomas Gleixner <tglx@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] jump_label/x86: Avoid decoding instructions for jump entry size
Date: Sat, 21 Nov 2026 12:15:47 -0800 [thread overview]
Message-ID: <awH76ikbfurgj63W@jpoimboe> (raw)
In-Reply-To: <20261117195506.23759-1-jolsa@kernel.org>
On Tue, Nov 17, 2026 at 08:55:06PM +0100, Jiri Olsa wrote:
> arch_jump_entry_size() runs the full instruction decoder just to find
> out whether a jump entry is 2 or 5 bytes long. A jump label site can
> only ever hold a JMP8, a JMP32 or the matching 2/5 byte NOP, so the
> size can be determined directly from the opcode byte or by comparing
> against the x86_nops[] encodings.
>
> This matters for kprobe registration, where the address safety check
> calls jump_label_text_reserved(), which walks the jump entries and
> calls arch_jump_entry_size() for each of them. When registering many
> kprobes the instruction decoding dominates the registration time.
>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
--
Josh
prev parent reply other threads:[~2026-11-21 20:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 19:55 Jiri Olsa
2026-11-21 20:15 ` Josh Poimboeuf [this message]
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=awH76ikbfurgj63W@jpoimboe \
--to=jpoimboe@kernel.org \
--cc=aliceryhl@google.com \
--cc=jbaron@akamai.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®