Repository navigation
fix(libkernel): give an inheriting thread its creator's priority - #5230
Merged
adriadam10 merged 1 commit intoOct 14, 2026
Merged
Conversation
Measured on a PS5 (firmware 13.60): a thread created with PTHREAD_INHERIT_SCHED, a null attribute or a default attribute runs at its creator's priority, whatever priority the attribute holds; with explicit scheduling it takes the attribute's priority. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 tasks done
This was referenced Oct 14, 2026
Collaborator
|
Checked the new priority rule in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A thread created with inherited scheduling took the priority stored in its attribute. On the console it runs at its creator's priority. I created threads from a homebrew payload on a PS5 (firmware 13.60), with the creator set to 450 and then to 600 through
scePthreadSetprio, and read the child's priority withscePthreadGetschedparam:mainPTHREAD_INHERIT_SCHED, priority 300 setPTHREAD_INHERIT_SCHED, no priority setscePthreadCreate,pthread_create)pthread_create)PTHREAD_EXPLICIT_SCHED, priority 300 setPTHREAD_EXPLICIT_SCHED, no priority setThe policy already followed this rule (#4086); the priority now does too. The TechnicalDebt sentence that recorded the difference is updated.
Titles, from a run on Linux with logging added to
scePthreadCreate:scePthreadGetschedparam.sndz_stream_task_service,tbb_thead) are created with inherited scheduling from creators at 699 and 680 and got 700.Tested
guest_pthread_schedparamnow also creates threads from a guest thread at 450 and 600 with each attribute in the table; it aborts onmain.agc_driver_tessellationsegfaults the same way on currentmain.guest_pthread_schedparampasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code