lunatik: register a percpu script as a single object - #762
Merged
Merged
Conversation
lneto
commented
Sep 2, 2026
Comment on lines
+94
to
+96
| int lunatik_closeobject(lua_State *L) | ||
| { | ||
| lunatik_closeprivate(lunatik_checkobject(L, 1)); |
lneto
force-pushed
the
claude_percpu_object
branch
from
September 2, 2026 23:42
cb5df6c to
f7488b8
Compare
This was referenced Sep 2, 2026
lneto
force-pushed
the
claude_ebpf_irqonly
branch
from
September 3, 2026 12:46
b63b7ca to
7bdb355
Compare
lneto
force-pushed
the
claude_percpu_object
branch
2 times, most recently
from
September 3, 2026 14:23
7640cfe to
8518402
Compare
lneto
force-pushed
the
claude_ebpf_irqonly
branch
2 times, most recently
from
September 3, 2026 18:49
6baf3d9 to
117fe8c
Compare
lneto
force-pushed
the
claude_percpu_object
branch
from
September 3, 2026 18:49
8518402 to
a109265
Compare
lneto
force-pushed
the
claude_ebpf_irqonly
branch
from
September 3, 2026 22:52
117fe8c to
837de41
Compare
lneto
force-pushed
the
claude_percpu_object
branch
from
September 3, 2026 22:52
a109265 to
6896eaa
Compare
lneto
force-pushed
the
claude_ebpf_irqonly
branch
from
September 3, 2026 23:01
837de41 to
f8089b8
Compare
lneto
force-pushed
the
claude_percpu_object
branch
2 times, most recently
from
September 3, 2026 23:08
b5df98b to
2a0c944
Compare
lneto
force-pushed
the
claude_ebpf_irqonly
branch
from
September 3, 2026 23:08
f8089b8 to
0e37660
Compare
lneto
force-pushed
the
claude_percpu_object
branch
2 times, most recently
from
September 3, 2026 23:19
6794ec3 to
dfc0f76
Compare
lneto
force-pushed
the
claude_ebpf_irqonly
branch
from
September 3, 2026 23:19
ae4c1a3 to
38a25c3
Compare
lneto
force-pushed
the
claude_percpu_object
branch
from
September 3, 2026 23:23
dfc0f76 to
b92abd1
Compare
lneto
force-pushed
the
claude_percpu_object
branch
2 times, most recently
from
September 3, 2026 23:35
892e235 to
28e220a
Compare
lneto
force-pushed
the
claude_percpu_object
branch
2 times, most recently
from
September 4, 2026 00:03
eac1088 to
9067033
Compare
lneto
force-pushed
the
claude_percpu_class
branch
from
September 4, 2026 12:02
05c2795 to
e80a774
Compare
lneto
force-pushed
the
claude_percpu_object
branch
2 times, most recently
from
September 4, 2026 12:04
b31ed16 to
5ae0807
Compare
lneto
force-pushed
the
claude_percpu_class
branch
2 times, most recently
from
September 4, 2026 12:07
7d3b277 to
8d7f920
Compare
lneto
force-pushed
the
claude_percpu_object
branch
2 times, most recently
from
September 4, 2026 12:37
7a59d67 to
694ea47
Compare
lneto
force-pushed
the
claude_percpu_class
branch
from
September 4, 2026 12:37
8d7f920 to
430f61f
Compare
lneto
force-pushed
the
claude_percpu_object
branch
from
September 4, 2026 12:45
694ea47 to
e197ddb
Compare
lneto
force-pushed
the
claude_percpu_class
branch
2 times, most recently
from
September 4, 2026 12:50
8a11104 to
92b4d42
Compare
lneto
force-pushed
the
claude_percpu_object
branch
from
September 4, 2026 12:50
e197ddb to
9316d27
Compare
lneto
force-pushed
the
claude_percpu_class
branch
from
September 4, 2026 13:18
92b4d42 to
30c4d7a
Compare
lneto
force-pushed
the
claude_percpu_object
branch
from
September 4, 2026 13:18
9316d27 to
2154274
Compare
lneto
force-pushed
the
claude_percpu_class
branch
from
September 4, 2026 13:19
30c4d7a to
e86d49c
Compare
lneto
force-pushed
the
claude_percpu_object
branch
2 times, most recently
from
September 4, 2026 13:20
221a8a8 to
e5eb5f2
Compare
lneto
force-pushed
the
claude_percpu_class
branch
from
September 4, 2026 13:20
e86d49c to
b107135
Compare
lneto
force-pushed
the
claude_percpu_object
branch
from
September 4, 2026 14:32
e5eb5f2 to
5e477c2
Compare
lneto
force-pushed
the
claude_percpu_object
branch
from
September 4, 2026 14:43
138bb43 to
5e477c2
Compare
lneto
force-pushed
the
claude_percpu_object
branch
2 times, most recently
from
September 4, 2026 22:41
d7c3441 to
fa86fce
Compare
env.runtimes held plain script names while env.percpu held one `<script>:<cpu>` key per instance, and every consumer had to know both: the runner looped over CPU ids to run, stop and list, and the XDP kfunc built a per-packet key to look the instance up. A percpu script now registers as one object under its own name, so there is one table, one key and one lookup, and the dispatch happens inside lunatik_run. The runner loses the key convention along with the two-phase shutdown that existed because stopping a percpu script deleted N entries under an iteration that only allows deleting the entry it hands out. lunatik.runtime loses its cpu argument: the runner was its only caller, and a script creating a runtime that claims an instance id is the trust-based declaration the registration checks exist to replace. This subsumes the registry split of 9b900f5, which existed to separate two key shapes in one table; the object removes the second shape. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lneto
force-pushed
the
claude_percpu_object
branch
from
September 4, 2026 22:42
fa86fce to
41d4314
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.
On top of #772, merged: the runner registers a percpu script as that object.
env.percpuand the<script>:<cpu>key convention are gone: one table, one key, one lookup. The runner loses the per-CPU loops and the two-phase shutdown that existed only because stopping a percpu script deleted N entries under an iteration that allows deleting only the entry it hands out; the eBPF kfuncs lose the per-packetscnprintfand second hash lookup.lunatik.runtimeloses its cpu argument: the runner was its only caller, and a script claiming an instance id is the trust-based declaration the registration checks exist to replace.spawn percpustays refused; #686 was built on the per-instance registry this removes and is to be redone over the object, one bound thread per instance.This subsumes the registry split of 9b900f5, which existed to separate two key shapes in one table; the object removes the second shape.
Tests:
tests/runtime/percpucovers the runner path (one instance per CPU id, listed once, stop and rerun, spawn refused, rollback of a failing instance); the xdp and tc drop cases and the receiving-CPU case cover the dispatch.Tested on 6.8.0-138 (aarch64), on this head over master: full suite 123/0/0, clean dmesg.
🤖 Generated with Claude Code