News for hackers. Stuff that matters.
Re:RedoxFS is the default filesystem of Redox OS, inspired b... by LexiMax on Friday September 26, 2025 @02:50PM (#45389771)
> It's so popular because it's the only data structure that is easy to use in C.

Is this reasoning really true? A quick search reveals the availability of higher-level data structures like trees, flexible arrays, hashtables, and the like, so it's not as if the linux kernel is lacking in data structures.

Linked lists have a few other advantages - simplicity and reference stability come to mind, but they might have other properties that makes them useful for kernel development beyond how easy they are to create.

Re:RedoxFS is the default filesystem of Redox OS, inspired b... by a-dub on Friday September 26, 2025 @04:54PM (#45390928)
there's a whole library inside linux and it's really good too!
Re:RedoxFS is the default filesystem of Redox OS, inspired b... by cyberax on Friday September 26, 2025 @10:25PM (#45392837)
> Is this reasoning really true?

Well, yes. The kernel _now_ has all kinds of data structures, but you can look at the documentation from 2006 and see the horror of even the simplest rbtrees back then: https://lwn.net/Articles/184495/

A simple generic hashtable was added only in 2013!

> Linked lists have a few other advantages - simplicity and reference stability come to mind, but they might have other properties that makes them useful for kernel development beyond how easy they are to create.

The main property is that it's easy to use from C. Think about growable vectors as an exercise.

Re:RedoxFS is the default filesystem of Redox OS, inspired b... by koverstreet on Saturday September 27, 2025 @01:04PM (#45397511)
Where do I find a basic vector type? :)
Re:RedoxFS is the default filesystem of Redox OS, inspired b... by cyberax on Saturday September 27, 2025 @05:09PM (#45399323)
Why, right here: https://elixir.bootlin.com/linux/v6.16.9/source/rust/kernel/... !

(XArray in regular C-based Linux also kinda qualifies)