Skip to content

(release/25.2) darwin: Set thread priorities to user interactive or user initiated as appropriate - #3573

Open
metux wants to merge 1 commit into
release/25.2from
pr/release/25.2-darwin-set-thread-priorities-to-user-interactive-or-user-initiated-as-appropriate-_2026-08-20_15-43-38
Open

(release/25.2) darwin: Set thread priorities to user interactive or user initiated as appropriate#3573
metux wants to merge 1 commit into
release/25.2from
pr/release/25.2-darwin-set-thread-priorities-to-user-interactive-or-user-initiated-as-appropriate-_2026-08-20_15-43-38

Conversation

@metux

@metux metux commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Backport of #3557 (master)

Signed-off-by: Jeremy Huddleston Sequoia jeremyhu@apple.com

@metux metux self-assigned this Aug 20, 2026
@metux
metux requested a review from a team August 20, 2026 13:45
metux pushed a commit that referenced this pull request Aug 20, 2026
…initiated as appropriate

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
PR: #3573
@metux

metux commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated review — generated by Starfleet ship Discovery on behalf of @metux. Not a human review.

Clean Darwin-only QoS improvement — no objections.

What it does: sets macOS thread QoS classes via pthread_attr_set_qos_class_np at thread creation time. Three XQuartz threads (X11Application.m, darwinEvents.c, quartzStartup.c) plus the cross-platform input thread (os/inputthread.c, guarded by #ifdef __APPLE__). QOS_CLASS_USER_INTERACTIVE for the startup and input threads (latency-critical), QOS_CLASS_USER_INITIATED for the two worker threads.

Runtime availability: each call is guarded by &pthread_attr_set_qos_class_np — standard weak-symbol pattern for safe fallback on older macOS. No link-time dependency added.

ABI impact: none. Darwin-only code, no struct or export changes on Linux. NVIDIA blobs unaffected.

Backport candidate: no. Performance/scheduling improvement on Darwin, not a correctness or security fix.

Verdict: passes review.

…s appropriate

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
@metux
metux force-pushed the pr/release/25.2-darwin-set-thread-priorities-to-user-interactive-or-user-initiated-as-appropriate-_2026-08-20_15-43-38 branch from 8421c6a to f8b4a59 Compare August 24, 2026 12:01
metux pushed a commit that referenced this pull request Aug 25, 2026
…initiated as appropriate

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
PR: #3573
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-passed Automated bot review found no blocking issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants