Skip to content

Thread cores: where the title's threads run - #11

Closed
broslife wants to merge 1 commit into
mainfrom
thread-cores
Closed

broslife wants to merge 1 commit into
mainfrom
thread-cores

Conversation

@broslife

@broslife broslife commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

The clock sweep (docs/NOTES.md, 2026-11-02) found latency CPU-bound at stock clocks. libnx's newlib glue creates every pthread on the process's default core, so the title's threads may all share core 0 while cores 1 and 2 idle. This PR is the probe that answers it before any thread is moved.

  • pf-nx-sys: a thread registry fed by the threadCreate wrapper. Each thread records the core it woke up on; main registers at the first report. report() reads each live thread's core mask, priority and per-core CPU ticks (InfoType_ThreadTickCount), and the process's core mask.
  • pf-nx-app: a ThreadProbe seam (Lifecycle::thread_probe). The spawners of the video, audio and input threads name them, and a threads: line follows each 10 s menu and stream summary.
  • Nothing changes in the stream path.

Next, once a handheld log shows the placement: give the threads explicit cores (0–2, core 3 untouched) and compare stats at stock clocks against the clock-sweep table.

Every thread the threadCreate wrapper starts registers with the core it
woke up on; main registers at the first report. Each menu and stream
summary is followed by a `threads:` line: the process's core mask, each
core's load from the title's threads, and for each thread its start
core, core mask, priority and share of each core. The spawners of the
video, audio and input threads name them in the registry. This is the
probe before any thread is placed on another core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@broslife

broslife commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

Closing without merging. The probe answered its question: the app's threads already run on cores 0 to 2, nearly idle, and the system's core 3 is the busy one (73 to 90 percent, serving socket calls). Nothing here ships. The finding is recorded in docs/improvements.md.

@broslife broslife closed this Nov 3, 2026
@broslife
broslife deleted the thread-cores branch November 3, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant