Files
RedBear-OS/local/docs
vasilito 1f0c0a01c5 redbear-power: doc v1.44 plan (affinity setter feasibility audit)
Adds §68 (v1.44 plan) and revises §67.7 (v1.43
deferred list) to reflect the v1.43 audit findings.

Key corrections captured in the doc:
  - The Redox kernel ALREADY implements
    sched_setaffinity and sched_getaffinity
    (local/sources/kernel/src/syscall/process.rs:322-382).
    Only the relibc POSIX <sched.h> wrapper is missing.
  - The existing P7-pthread-affinity relibc patch
    provides cpu_set_t, cpuset_to_u64, copy_u64_to_cpuset
    — v1.44 can reuse these instead of duplicating.
  - Kernel pid=0 limitation is documented at
    kernel/src/syscall/process.rs:336-338 as a TODO;
    v1.44's UX is honest about this ('pin redbear-power's
    own TUI to this process's CPU list, not the
    highlighted process's').
  - Per-thread CPU% is REJECTED for v1.44 because the
    Redox proc scheme doesn't expose /proc/<pid>/task/<tid>/stat.
    Same trap as v1.41 read_thread_io. Tracked as a kernel
    follow-up, not a redbear-power feature.
  - disk_history cap is REJECTED for v1.44 because the
    natural bound on block device count (~4-8 typical)
    makes the cap moot. Drive-by include it elsewhere.

Implementation plan documented:
  1. relibc patch P12-sched-setaffinity.patch (~110 LoC,
     reusing P7 helpers)
  2. redbear-power affinity.rs module (~30 minutes)
  3. main.rs key binding (capital A) + PID detail
     popup integration (~1.5 hours)
  4. 5-7 tests (round-trip, pid=0 limitation, parse/format,
     integration against /proc/self/status)
  5. Doc update §69 on what shipped

Effort estimate: ~1 working day, end-to-end. The
relibc patch alone is <3 hours given P7 reuse.

Downstream recipe impact audited (LOW):
  - Mesa and xz both wrap sched_getaffinity in
    defensive probes — they go from ENOSYS to
    'current process mask works' (strict improvement,
    no break).

No code changes — planning-only commit.
2026-06-21 15:27:47 +03:00
..