docs(libkernel): record the measured pthread_setaffinity_np set sizes #15179

Merged
EagleBearerYS merged 1 commit from upstream-pr/15179 into main 2026-11-02 22:43:18 +00:00
EagleBearerYS commented 2026-11-02 20:07:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-11-02T20:07:21Z.


What

Corrects a sentence that #14039 added to the pthread_getaffinity_np entry in docs/dev/debt/libkernel.md.

  • The wrong sentence: "pthread_setaffinity_np keeps FreeBSD's unmeasured 32-byte limit".
  • The source: @rooklz measured the setter on a PS5 (comment on #7135): sizes 8 and 16 succeed, and 0, 1, 4, 32, 64 and 128 return ERANGE.
  • Who caught it: @B-Howell, on #14039 (comment), a minute before it merged.

The setter and cpuset_* sentence moves into an entry of its own: "their set sizes still follow FreeBSD's 32-byte cpuset_t, not the console".

  • It cites rooklz's #7135 measurement for pthread_setaffinity_np and their #9156 sweep for cpuset_getaffinity and cpuset_setaffinity.
  • That sweep covered only the getter and cpuset_*, so the setter's 9 to 15 bytes weren't tried, and the entry claims nothing for them.
  • Why a separate entry: adding the link to the getter entry would have taken it past the 1,000-character debt limit, and getting back under it would have meant rewording DeveshB-1's #13908 sentence there. As two entries they are 771 and 590 characters, and #13908's sentence is unchanged.

Docs only. The setter's behaviour isn't changed here.

Related: #14039

Tested

  • tools/check_conventions.py: all passed.
  • No code changed.

Checklist

  • Based on current main; no other open PR implements the same functions (docs only; no open PR changes these two entries)
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt: n/a, docs only
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file: n/a, docs only
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source: n/a, none
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5126664976 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15179). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-11-02T20:07:21Z. --- ### What Corrects a sentence that #14039 added to the `pthread_getaffinity_np` entry in `docs/dev/debt/libkernel.md`. - **The wrong sentence:** "`pthread_setaffinity_np` keeps FreeBSD's unmeasured 32-byte limit". - **The source:** @rooklz measured the setter on a PS5 ([comment on #7135](https://github.com/boykopovar/AnyPS5/pull/7135#issuecomment-6390891591)): sizes 8 and 16 succeed, and 0, 1, 4, 32, 64 and 128 return `ERANGE`. - **Who caught it:** @B-Howell, on #14039 ([comment](https://github.com/boykopovar/AnyPS5/pull/14039#issuecomment-6586782053)), a minute before it merged. The setter and `cpuset_*` sentence moves into an entry of its own: "their set sizes still follow FreeBSD's 32-byte `cpuset_t`, not the console". - It cites rooklz's #7135 measurement for `pthread_setaffinity_np` and their [#9156 sweep](https://github.com/boykopovar/AnyPS5/pull/9156#issuecomment-6391607043) for `cpuset_getaffinity` and `cpuset_setaffinity`. - That sweep covered only the getter and `cpuset_*`, so the setter's 9 to 15 bytes weren't tried, and the entry claims nothing for them. - **Why a separate entry:** adding the link to the getter entry would have taken it past the 1,000-character debt limit, and getting back under it would have meant rewording DeveshB-1's #13908 sentence there. As two entries they are 771 and 590 characters, and #13908's sentence is unchanged. Docs only. The setter's behaviour isn't changed here. Related: #14039 ### Tested - `tools/check_conventions.py`: all passed. - No code changed. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions (docs only; no open PR changes these two entries) - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md): n/a, docs only - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file: n/a, docs only - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source: n/a, none - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-11-02 20:18:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T20:18:44Z.

Review: COMMENTED


Reviewed — no blocking findings

This documentation-only patch replaces an inaccurate “unmeasured” claim with the cited PS5 measurements; it does not change implementation behavior.

What I ran

Reviewed PR #15179 at head 93a3f5e0d25abc7719a7664be48b100c64a4f88e against base 096c45570f516de76a43bbe1b97781381c84f55f; the merge preview was clean. Environment: Debian Linux x86_64, Python 3.11.2.

git diff --check 096c45570f516de76a43bbe1b97781381c84f55f...93a3f5e0d25abc7719a7664be48b100c64a4f88e
python3 tools/check_conventions.py --base 096c45570f516de76a43bbe1b97781381c84f55f --head 93a3f5e0d25abc7719a7664be48b100c64a4f88e --title "docs(libkernel): record the measured pthread_setaffinity_np set sizes" --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15179-93a3f5e0d25a/pr-body.md
python3 tools/pr_stack_check.py 15179 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15179-93a3f5e0d25a/stack
gh api repos/boykopovar/AnyPS5/issues/comments/6390891591
gh api repos/boykopovar/AnyPS5/issues/comments/6391607043

Results

Check Result Note
Diff and conventions passed Documentation diff is clean; conventions passed.
Dependency and merge preview passed No declared dependencies; clean against base.
Hosted policy checks not run Four required checks remain queued.
Build and tests not applicable Documentation-only change.
Test-quality helper not run Optional helper is absent from the isolated head snapshot.
Precheck summary and raw output
Check Status Command / reason
build_and_compile not_applicable The precheck deliberately does not configure, build, or compile AnyPS5.
diff_check passed git diff --check 096c45570f516de76a43bbe1b97781381c84f55f...93a3f5e0d25abc7719a7664be48b100c64a4f88e
conventions_and_pr_template passed /usr/bin/python3 tools/check_conventions.py --base 096c45570f516de76a43bbe1b97781381c84f55f --head 93a3f5e0d25abc7719a7664be48b100c64a4f88e --title docs(libkernel): record the measured pthread_setaffinity_np set sizes --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15179-93a3f5e0d25a/pr-body.md
changed_export_abi_audit not_applicable No changed source or public header under core/libs/prx.
python_syntax not_applicable No changed Python implementation files.
related_python_unit_tests not_applicable No changed tools module with a sibling unit-test suite.
python_test_registration not_applicable No changed Python test files.
live_dependency_and_mergeability_check passed Exact-head stack check; clean base preview and no declared dependencies.
build_dependent_cpp_tests not_applicable No C/C++ implementation or test files changed.
test_quality_heuristics failed Optional pr_test_quality.py was absent from the isolated head snapshot.
negative_controls not_applicable No changed Python test module for a base-source control.

Raw conventions output:

All conventions checks passed.

Raw test-quality helper error:

/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15179-93a3f5e0d25a/head-93a3f5e0d25a-91e1af71/tools/pr_test_quality.py': [Errno 2] No such file or directory

Negative control

Not applicable; this PR changes documentation only.

Findings

Blocking

None found in the changed documentation.

Non-blocking

None.

Sources

Not verified

I did not rerun the PS5 measurements. The measurement links are contributor-reported console observations; this review verified their contents and the current implementation’s 32-byte setter check. Four hosted policy checks remain queued.

To get this to a good state

No documentation change is requested. Let the queued checks finish; I’ll refresh the head and required check results before considering approval.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5742766668 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15179#pullrequestreview-5742766668). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T20:18:44Z. **Review:** COMMENTED --- # Reviewed — no blocking findings This documentation-only patch replaces an inaccurate “unmeasured” claim with the cited PS5 measurements; it does not change implementation behavior. ## What I ran Reviewed PR #15179 at head `93a3f5e0d25abc7719a7664be48b100c64a4f88e` against base `096c45570f516de76a43bbe1b97781381c84f55f`; the merge preview was clean. Environment: Debian Linux x86_64, Python 3.11.2. ```sh git diff --check 096c45570f516de76a43bbe1b97781381c84f55f...93a3f5e0d25abc7719a7664be48b100c64a4f88e python3 tools/check_conventions.py --base 096c45570f516de76a43bbe1b97781381c84f55f --head 93a3f5e0d25abc7719a7664be48b100c64a4f88e --title "docs(libkernel): record the measured pthread_setaffinity_np set sizes" --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15179-93a3f5e0d25a/pr-body.md python3 tools/pr_stack_check.py 15179 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15179-93a3f5e0d25a/stack gh api repos/boykopovar/AnyPS5/issues/comments/6390891591 gh api repos/boykopovar/AnyPS5/issues/comments/6391607043 ``` ## Results | Check | Result | Note | |---|---|---| | Diff and conventions | passed | Documentation diff is clean; conventions passed. | | Dependency and merge preview | passed | No declared dependencies; clean against base. | | Hosted policy checks | not run | Four required checks remain queued. | | Build and tests | not applicable | Documentation-only change. | | Test-quality helper | not run | Optional helper is absent from the isolated head snapshot. | <details><summary>Precheck summary and raw output</summary> | Check | Status | Command / reason | |---|---|---| | build_and_compile | not_applicable | The precheck deliberately does not configure, build, or compile AnyPS5. | | diff_check | passed | `git diff --check 096c45570f516de76a43bbe1b97781381c84f55f...93a3f5e0d25abc7719a7664be48b100c64a4f88e` | | conventions_and_pr_template | passed | `/usr/bin/python3 tools/check_conventions.py --base 096c45570f516de76a43bbe1b97781381c84f55f --head 93a3f5e0d25abc7719a7664be48b100c64a4f88e --title docs(libkernel): record the measured pthread_setaffinity_np set sizes --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15179-93a3f5e0d25a/pr-body.md` | | changed_export_abi_audit | not_applicable | No changed source or public header under core/libs/prx. | | python_syntax | not_applicable | No changed Python implementation files. | | related_python_unit_tests | not_applicable | No changed tools module with a sibling unit-test suite. | | python_test_registration | not_applicable | No changed Python test files. | | live_dependency_and_mergeability_check | passed | Exact-head stack check; clean base preview and no declared dependencies. | | build_dependent_cpp_tests | not_applicable | No C/C++ implementation or test files changed. | | test_quality_heuristics | failed | Optional `pr_test_quality.py` was absent from the isolated head snapshot. | | negative_controls | not_applicable | No changed Python test module for a base-source control. | Raw conventions output: ```text All conventions checks passed. ``` Raw test-quality helper error: ```text /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15179-93a3f5e0d25a/head-93a3f5e0d25a-91e1af71/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` </details> ## Negative control Not applicable; this PR changes documentation only. ## Findings ### Blocking None found in the changed documentation. ### Non-blocking None. ## Sources - [Current setter size check at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/93a3f5e0d25abc7719a7664be48b100c64a4f88e/core/libs/prx/libkernel/Pthread/Posix/Thread.cpp#L287-L299) - [Updated debt entry at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/93a3f5e0d25abc7719a7664be48b100c64a4f88e/docs/dev/debt/libkernel.md#L187-L188) - [PS5 affinity measurements reported on #7135](https://github.com/boykopovar/AnyPS5/pull/7135#issuecomment-6390891591) - [Follow-up size sweep reported on #9156](https://github.com/boykopovar/AnyPS5/pull/9156#issuecomment-6391607043) ## Not verified I did not rerun the PS5 measurements. The measurement links are contributor-reported console observations; this review verified their contents and the current implementation’s 32-byte setter check. Four hosted policy checks remain queued. ## To get this to a good state No documentation change is requested. Let the queued checks finish; I’ll refresh the head and required check results before considering approval.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!15179
No description provided.