fix(library): yield the SD card between entries in the dual-core index walk - #58
Merged
Merged
Conversation
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
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.
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 inLibraryPrewarm::serviceBuild, only whenportNUM_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