lunatik: percpu:resume delivers to every instance - #792
Open
lneto wants to merge 1 commit into
Open
Conversation
lneto
force-pushed
the
claude_percpu_resume
branch
2 times, most recently
from
September 6, 2026 23:06
3830dda to
778a873
Compare
lneto
force-pushed
the
claude_resume_results
branch
from
September 7, 2026 13:58
6baa91f to
3052934
Compare
lneto
force-pushed
the
claude_percpu_resume
branch
from
September 7, 2026 13:58
778a873 to
0bf193e
Compare
A percpu script that needs an object handed to it by the runtime that started it, the quarantine set of the ifquarantine example, had no way to be given one: resume belonged to the plain runtime alone, so a script that takes its state that way could not be an instance per CPU. percpu:resume copies the objects into each instance and resumes it under the instance's lock, where it also reads the state, since an instance dispatches as soon as its script registers a hook and a stopped one has no state left. The error an instance raises is copied out under that lock and raised after it, naming the instance, because formatting it in place would allocate under a spinlock. lunatik_copyobjects and lunatik_resume lose their static to be reached from the percpu file. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
lneto
force-pushed
the
claude_percpu_resume
branch
from
September 7, 2026 14:19
0bf193e to
7a57e49
Compare
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.
A percpu script that needs an object from the runtime that started it, the quarantine set of the
ifquarantineexample, has no way to get one:resumebelongs to the plain runtime alone.percpu:resumecopies the objects into each instance and resumes it under the instance lock, where it also reads the state, since an instance dispatches as soon as its script registers a hook and a stopped one has no state left. Delivering the objects and resuming becomes one entry point,lunatik_resume, so that sequence is written once for both callers. Test:resume_percpu.Based on #799.