Page MenuHomeFreeBSD

LinuxKPI: add system_percpu_wq
Needs ReviewPublic

Authored by bz on Jan 21 2026, 2:02 PM.
Tags
None
Referenced Files
F159988422: D54811.diff
Sat, Jun 20, 7:11 AM
F159974896: D54811.diff
Sat, Jun 20, 3:23 AM
Unknown Object (File)
Sun, May 31, 3:32 PM
Unknown Object (File)
Sat, May 30, 8:09 AM
Unknown Object (File)
Thu, May 28, 12:38 AM
Unknown Object (File)
May 5 2026, 5:53 PM
Unknown Object (File)
Apr 27 2026, 10:34 AM
Unknown Object (File)
Apr 21 2026, 1:11 AM
Subscribers

Details

Reviewers
None
Group Reviewers
linuxkpi
Summary

Add system_percpu_wq as an alias for linux_system_short_wq for now.
A system_percpu_wq likely needs a lot more elaborated work if anything
beyond mt76 starts needing it.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 70040
Build 66923: arc lint + arc unit

Event Timeline

bz requested review of this revision.Jan 21 2026, 2:02 PM
sys/compat/linuxkpi/common/src/linux_work.c
726

Can we expand the XXX, e.g. some details from the proposed commit message?

sys/compat/linuxkpi/common/src/linux_work.c
726

How did you know I was going to get back to this one. I literally was thinking about it an hour ago.

Turns out the system_wq was s///g with the system_percpu_wq in v6.18.
And given we assign all "fast" wq to the short_wq rather than having one per (and extra threads) this seems fine even without the XXX.

alloc_workqueue() [linux_create_workqueue_common()] already starts n threads; the only thing we do not seem to do is bind each one to a CPU but doing so seems tricky with the current API unless we have another dedicated wq for percpu; I have no idea if any/all the "short" ones should have CPUs affinity but if they should be the system_wq should have been too.

It seems the Linux Documentation was not updated to reflect this change at all.