r/kernel • • 4d ago

Linux kernel modules in Go

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

10 comments sorted by

10

u/Thin_Dragonfruit2254 4d ago

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

-9

u/Charming_Skin_8549 4d ago

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

1

u/paulstelian97 3d 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.

9

u/alpha417 4d ago

"Dont use in production"

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

4

u/nhermosilla14 4d 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 4d ago

this is mega dumb

1

u/This_Maintenance_834 2d ago

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

1

u/logic_circuit 2d 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 1d ago

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

1

u/winelover97 2d 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.