Skip to content

fix(library): yield the SD card between entries in the dual-core index walk - #58

Merged
prokrypt merged 1 commit into
developmentfrom
fix/library-walk-yield
Sep 28, 2026
Merged

prokrypt merged 1 commit into
developmentfrom
fix/library-walk-yield

Conversation

@prokrypt

Copy link
Copy Markdown
Owner

Before: on the X4 Pro and Sticky, Home could stall waiting for the SD card while the background Library index walk ran on core 0.

After: the walk gives up the card for one tick between entries on dual-core chips, so Home's storage access gets in promptly.

The storage mutex does not hand off to a waiter, so the core-0 walk could retake it before the core-1 Home task woke. How: vTaskDelay(1) after each entry in LibraryPrewarm::serviceBuild, only when portNUM_PROCESSORS > 1. The single-core C3 build compiles it out (C3 flash −24 B noise, RAM +0; x4-pro-light-sleep flash +16 B, RAM +0).

🤖 Generated with Claude Code

https://claude.ai/code/session_01XgLRarbAmBVepTPKCK7mgd


Generated by Claude Code

dc7ab09 dropped the vTaskDelay(1) that 52b5fd6 added. The storage mutex
does not hand off to a waiter, so the walk on core 0 could retake it
before a Home task waiting on core 1 woke. Single-core stays yield-free.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XgLRarbAmBVepTPKCK7mgd
@prokrypt
prokrypt merged commit 6399ce1 into development Sep 28, 2026
9 checks passed
@prokrypt
prokrypt deleted the fix/library-walk-yield branch September 28, 2026 15:59
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.

2 participants