4 ms·
Happy to see this on HN =). Lunatik’s main author here. AMA. Please feel welcome to join us on Matrix [1] as well. [1] https://matrix.to/#/#lunatik:matrix.org
by lneto 2y ago
Happy to see this on HN =). Lunatik’s main author here. AMA.
Please feel welcome to join us on Matrix [1] as well.
[1] https://matrix.to/#/#lunatik:matrix.org https://matrix.to/#/#lunatik:matrix.org
- bgm1975 2y agoWhat are some of the main use cases for this project?
- lneto 2y agothe most explored use case is for scripting networking, please see: [1] https://legacy.netdevconf.info/0x14/session.html?talk-linux-network-scripting-with-lua https://legacy.netdevconf.info/0x14/session.html?talk-linux-... [2] https://netdevconf.info/0x17/sessions/talk/scripting-the-linux-routing-table-with-lua.html https://netdevconf.info/0x17/sessions/talk/scripting-the-lin... [3] https://www.netbsd.org/~lneto/dls14.pdf https://www.netbsd.org/~lneto/dls14.pdf [4] https://www.slideshare.net/eurobsdcon/lneto-npf-scripting https://www.slideshare.net/eurobsdcon/lneto-npf-scripting [5] https://2018.eurobsdcon.org/static/slides/Fast,%20Flexible%20Packet%20Filtering%20in%20NetBSD%20using%20Lua%20Kernel%20Scripts%20-%20Andrew%20von%20Dollen.pdf https://2018.eurobsdcon.org/static/slides/Fast,%20Flexible%2... However, it was conceived for extensibility and flexibility in general, in the spirit of [6]. It has been used also for scripting CPU frequency scaling, debugging, application sandboxing among others [7,8]. [6] https://web.stanford.edu/~ouster/cgi-bin/papers/scripting.pdf https://web.stanford.edu/~ouster/cgi-bin/papers/scripting.pd... [7] https://drive.google.com/file/d/1TJ50IEbRXlBz-TxheGdkO-b4vLS-vcHn/view https://drive.google.com/file/d/1TJ50IEbRXlBz-TxheGdkO-b4vLS... [8] https://youtu.be/-ufBgy044HI?si=IT4FOqeldA-jsg2r https://youtu.be/-ufBgy044HI?si=IT4FOqeldA-jsg2r (Portuguese only) ZFS also has its own kernel Lua version (I'd love to unify them, BTW). Moreover, we have some simplified examples on our repository [9]. [9] https://github.com/luainkernel/lunatik?tab=readme-ov-file#examples https://github.com/luainkernel/lunatik?tab=readme-ov-file#ex...
- vaylian 2y agoDoes this use or relate to eBPF in any way?
- lneto 2y agoIt doesn't use eBPF but we can interoperate.. we have developed XDPLua for this as a GSoC project [1] and then published this work on Netdev 0x14 [2]. [1] https://victornogueirario.github.io/xdplua/ https://victornogueirario.github.io/xdplua/ [2] https://netdevconf.info/0x14/session.html?talk-linux-network-scripting-with-lua https://netdevconf.info/0x14/session.html?talk-linux-network... I'm currently working on updating XDPLua for using kfuncs on top of the newest version of Lunatik.. I've a PoC already and should create a PR in a few weeks.
- Log_out_ 2y agoCould this allow for a hard real time Lua programmable system if you replace gc?
- lneto 2y agoPotentially, yes. However, I didn't try it. You could even disable GC completely. Lunatik provides some facilities that could be useful in this scenario as well, such as RCU tables and shared objects. For instance, you could pre-allocate the entire memory to be used by your Lua states and treat them as volatile. In this case, you could persist state on the shared objects stored and synchronized through a RCU table. Of course, you could implement your own GC or tune the existent GC modes as well.