-
Notifications
You must be signed in to change notification settings - Fork 152
x86/bpf: Avoid emitting LOCK prefix for XCHG atomic ops #10454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bpf-next_base
Are you sure you want to change the base?
Conversation
|
Upstream branch: 5d9fb42 |
caaaee4 to
0f1145d
Compare
|
Upstream branch: 5d9fb42 |
f262047 to
664a554
Compare
0f1145d to
fabb672
Compare
|
Upstream branch: c93c124 |
664a554 to
05f6194
Compare
fabb672 to
3119ae5
Compare
|
Upstream branch: 759377d |
05f6194 to
a97dee2
Compare
3119ae5 to
162c0b3
Compare
|
Upstream branch: 6f0b824 |
The x86 XCHG instruction is implicitly locked when one of the operands is a memory location, making an explicit LOCK prefix unnecessary. Stop emitting the LOCK prefix for BPF_XCHG in the JIT atomic read-modify-write helpers. This avoids redundant instruction prefixes while preserving correct atomic semantics. No functional change for other atomic operations. Signed-off-by: Uros Bizjak <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Daniel Borkmann <[email protected]> Cc: Andrii Nakryiko <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Dave Hansen <[email protected]> Cc: "H. Peter Anvin" <[email protected]>
a97dee2 to
5cf957b
Compare
Pull request for series with
subject: x86/bpf: Avoid emitting LOCK prefix for XCHG atomic ops
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1031444