Skip to contentSkip to conversation

New: may_use_simd() returns false in kworkers

Bug 203571 [email protected] 1 participant 3 messages May 11, 2019 – May 13, 2019

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=203571

Bug ID: 203571
Summary: may_use_simd() returns false in kworkers
Product: Platform Specific/Hardware
Version: 2.5
Kernel Version: 4.19
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: PPC-64
Assignee: [email protected]
Reporter: [email protected]
Regression: No

This patch optimizing chacha20 for WireGuard
https://github.com/shawnl/WireGuard/commit/3e02fce92a14cba7b7d1e2733def3a51bec97498

doesn't work because may_use_simd() is always returning false in kworkers. If I remove the check everything seems to work fine.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 203571] may_use_simd() returns false in soft irq context

https://bugzilla.kernel.org/show_bug.cgi?id=203571

--- Comment #1 from Shawn Landden ([email protected]) ---
▒
- 11.41% 0.01% kworker/1:2-mm_ [kernel.vmlinux] [k]
process_one_work
▒
- 11.41% process_one_work

▒
- 10.28% wg_packet_tx_worker

▒
- 10.06% wg_socket_send_skb_to_peer

▒
- 7.38% _raw_read_unlock_bh

▒
- 7.35% __local_bh_enable_ip

▒
- 7.34% do_softirq.part.2

▒
- 7.31% do_softirq_own_stack

▒
+ 7.28% call_do_softirq

▒
- 2.45% send4

▒
- 1.85% udp_tunnel_xmit_skb

▒
- 1.66% iptunnel_xmit

▒
- 1.33% ip_local_out

▒
- 1.14% ip_output

▒
- 1.06% ip_finish_output2

▒
+ 0.99% __dev_queue_xmit

▒
- 1.06% wg_packet_encrypt_worker

▒
- 1.03% encrypt_packet

▒
- 0.98% chacha20poly1305_encrypt_sg

▒

                 0.59% chacha20
Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 203571] Allow use of SIMD in interrupts on PowerPC

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=203571

--- Comment #2 from Shawn Landden ([email protected]) --- X86 manages to allow SIMD in interrupts through some very careful code in arch/x86/kernel/fpu/core.c (starting with irq_fpu_usable())

PowerPC can do the same.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.