r/kernel • • 6d ago

Linux kernel modules in Go

https://jespino.github.io/gokm/
33 Upvotes

11 comments sorted by

10

u/Thin_Dragonfruit2254 6d ago

It might have a usecase but "garbage-collected Go heap inside the kernel" is a bit concerning, no?

-9

u/Charming_Skin_8549 6d ago

There shouldn't be issues if Go memory isn't passed to Linux kernel.

1

u/paulstelian97 5d ago

You do not want unnecessary memory allocations in the kernel — any memory allocated and unused by the kernel is not easy to free up when there’s a need for it. Also memory leaks. Also memory fragmentation. The kernel is intended to be stingy for stuff running in kernel space, so the userspace has access to as much as possible.

10

u/alpha417 6d ago

"Dont use in production"

welp, i dev in prod...so that settles it for me.

4

u/nhermosilla14 6d ago

I see a point to TinyGo, but I'm having a hard time seeing it here. Not every language is a systems language, and that's fine.

2

u/AngryFker 6d ago

this is mega dumb

1

u/This_Maintenance_834 4d ago

people cannot be serious enough to write kernel with language that uses garbage collection? is this a joke?

1

u/logic_circuit 3d ago

Not today. Kernel is about to grow and live its own life. Users will have to adopt to that. Just like Android bloatware.

1

u/This_Maintenance_834 3d ago

that is why I don't buy any android phones. not that I like iPhone.

1

u/winelover97 4d ago

Whats up with adding lot of unnecessary setup complications by supporting languages that adds little to no value for something like kernel for namesake.

1

u/notddh 1d ago

Can't wait for other garbage collected languages to join in. Imagine having five different JS runtimes running in ring 0.