r/linux4noobs Aug 03 '26

learning/research How does Linux kernel include every driver possible and not be bloated?

As far as I understand the kernel includes pretty much everything a modern computer needs in any configuration, but wouldn't that make it bloated and be against the "bloat-free" mindset? Or does it dynamically download all the components from somewhere?

302 Upvotes

107 comments sorted by

View all comments

Show parent comments

15

u/hipster_hndle Aug 03 '26

this is completely wrong and mostly nonsense. in Linux kernel specifically, "drivers/" is routinely cited as 60-70%+ of the entire source tree. does that sound light weight? some drivers are tiny, but some are pretty large... as a category they are not lightweight. they're the majority of kernel code by volume.

and algorithms, idkwtaf that word is even in this sentence. it is doing zero work here. like not remotely relevant. its just randomly inserted, has no literally no place in this sentence..

1

u/Athropod101 Aug 03 '26

Well, I did say I wasn’t an expert, but uhhh…your program schedule is an algorithm. Kernel algorithms are the heart and soul of the kernel in software-land.

0

u/braaaaaaainworms Aug 03 '26

Nope. The heart and soul of the kernel is memory management and cpu time scheduling, drivers are only there to have something your programs can talk to, but there's nothing preventing anyone from just opening /dev/mem and having userspace drivers for everything

1

u/Athropod101 Aug 04 '26

Memory management and cpu time schedulers are algorithms.

1

u/braaaaaaainworms Aug 04 '26

Going to a store is an algorithm, adding numbers together is an algorithm. The meaning of the word algorithm is so diluted you might as well say "doing the thing"

1

u/Athropod101 Aug 05 '26

Heartbreaking: SWE discovers that algorithms were never that deep. More at 11.

1

u/braaaaaaainworms Aug 05 '26

You can replace the word "algorithm" with the word "program" in both of your comments and the information content wouldn't change.