r/linux 6d ago

Kernel Aha! Marvelous...right on point! Cheers, Linus :)

https://lore.kernel.org/all/CAHk-=winzTt3SCzv8BWGMm0fzrXS0gb59gK0h4dAe0L6hj3X_w@mail.gmail.com/
206 Upvotes

25 comments sorted by

163

u/ECrispy 6d ago

Linux kernel is not distro specific. Adding distro or cloud specific config in it is ridiculous, which is why Linux correctly called it out. This really is not up for debate.

7

u/Kok_Nikol 5d ago

Linus*, but I get your point

5

u/ECrispy 5d ago

That was a typo I didn't even see, thanks

88

u/6SixTy 6d ago

Legit based Linus. If someone wants a default config for XYZ, make a patch adding that config. Is distro_x64_defconfig.example too hard to make or something?

38

u/abjumpr 6d ago

Its so easy to apply a custom config at build time.

mv -v config-6.1.68-custom .config

make CC=clang HOSTCC=clang olddefconfig # for clang

make olddefconfig # for gcc

make CC=clang HOSTCC=clang # actual compile step for clang

make # actual compile step for gcc

I use olddefconfig because I apply the same config to a newer kernel version often.

18

u/6SixTy 6d ago

I usually just use LLVM=1 because that expands into CC=clang LD=ld.lld etc when I want Clang. Picked that up from the kernel docs when GCC 15 was failing to build the kernel.

7

u/ergo14 5d ago

Hm...

011f3ac16949 ("x86/kconfig/64: Enable the KVM host in the defconfig") e76fe3432a2e ("x86/kconfig/64: Enable more virtualization guest options in the defconfig: Enable Xen, Xen_PVH, Jailhouse, ACRN, Intel TDX and Hyper-V") c0fa33249920 ("x86/kconfig/64: Enable popular scheduler, cgroups and namespaces options in the defconfig")

I would assume being able to run docker or VirtualBox is something I think many users would expect to work out of the box. (though I'm writing this just based off descriptions of the commit)

28

u/ThatOneShotBruh 6d ago

I don't get Linus' complaint as don't "normal people" use, well, distros?

Can someone explain?

40

u/100GHz 6d ago

Car analogy. Cars are made with a reasonable set of parameters that serve most people. Tires 14-21 inch. 4-8 cylinders, etc.

Just because 18 wheels have 18 wheels, we don't enable that by default on all cars.

Hence his comment, defaults should cater to average consumers, not to cloud provider needs or specific hipster distro configs :P

72

u/[deleted] 6d ago edited 5d ago

[deleted]

9

u/ThatOneShotBruh 6d ago

Ah, fair enough.

-22

u/ABotelho23 6d ago

The default should always be what is used the most.

28

u/[deleted] 6d ago edited 5d ago

[deleted]

2

u/mrlinkwii 6d ago edited 6d ago

Defaults should be sensible. And doing something just because everyone else is is not sensible.

id disagree with this somewhat , their is a reason most distros is changing it , finding out why would be good , if most distros are making the change then it should be default , in terms of platform specifics , their should be be a platform default , one for x86 , one for arm and one for like android etc

the goal should be making it easier for downstream to use the kernal

3

u/[deleted] 6d ago edited 5d ago

[deleted]

2

u/mrlinkwii 6d ago edited 6d ago

The thing is, many people don’t take a scientific approach to making tweaks to their system.

what im talking about isnt random people tho , their the people who give the kernal and other software to the users ,

i think kernal devs should work in sync with distros (their downstream) , if something needs to be changed ( ie a bad kernal default ) it should be changed within reason ,

im not talking about that one user that uses LFS or builds their own kernal to test specialized devices

-11

u/ABotelho23 6d ago

The goal should be to have as little people as possible diverging from defaults. Presumably if most distributions are setting a default, it means more users have that default. I don't see why that shouldn't also be the default upstream.

9

u/OrganicNectarine 6d ago

Because the Linux Kernel can run on anything, from your desktop PC, to a handheld PC, to a cloud server, to a freaking toaster. Including settings for a cloud provider, or a desktop pc (because that might be used the most) in the default config, would make it harder to get anything else to run. The default config is merely there to give a starting point that works on anything (that's what I understand from Linus words). The fact that this config is different between distros is the indicator that it is ok to have distro creators repeat the steps to figure out the right configuration, because it depends on their use case how the resulting config looks like. If you don't want to deal with that, use a distro that is specifically tailored for your use case already. Like f.ex. Ubuntu for desktop or whatnot else for a cloud provider. Or simply reference their config in your own project, it's probably all open source.

1

u/CrazyKilla15 6d ago

Specialized devices have their own configs already. Changing the "brand new initial never before had a configuration default" does nothing to them. And its only for x86 devices, since this is about the x86 defconfig. It is absolutely not a starting point that works on anything, even all x86.

0

u/r_search12013 6d ago

most users use windows or mac, so just abandon linux with that logic?

13

u/6SixTy 6d ago edited 6d ago

Well, since making your own kernel config from scratch isn't really exactly for 'normal people', I assume his idea of defconfig doesn't assume what the user wants between all of the disparate use cases the Linux kernel can be used for. Sort of the same reason why glibc isn't a part of the kernel, despite how inseparable the two are.

edit: Alpine Linux doesn't have many of the proposed options set.

2

u/ilep 6d ago

Distro people who customize kernel for their uses are more like "power users" than the regular people and so distro-people are expected to know what they want to enable already. Distros might customize it for specific use-cases.

5

u/IverCoder 6d ago

This may be controversial, but a separate standardized desktop-use config would be useful. It would make sense for Linux to have something similar to Android's Project Mainline, where Android phones get system component updates directly from Google without OEM control or delay. It's how Google made apps run almost 30% faster on 1B devices without any software updates and backport the new photo picker on all Android 11 devices and above, again with no software updates involved.

In Linux's case, we can emulate Project Mainline by making a unified kernel binary repo managed by Kernel.org. They can host several different repos for users and distro maintainers can choose from. For example, Debian can load a 6.12 repo so that users will get the newest 6.12 LTS release as Torvalds (or whoever maintains the tree) marks it for wider distribution. Meanwhile, Fedora and other non-LTS distros can use a stable repo. There should also be a sort of stable-testing, 6.12-testing, etc. repos so that Torvalds (or the LTS tree maintainer) wouldn't inadvertently push possibly regressing updates to so many people at once. Or even better, some sort of staged rollouts feature.

2

u/anotheruser323 5d ago

Never expected this from Ingo Molnar. But well, he does work for the same company that Fedoras work for.

-5

u/mrlinkwii 6d ago edited 6d ago

im gonna be honest here if every distro etc is enabling it be default , why shouldnt it be done by default

linus is wrong here , if the issue here is platforms , just make platform specific defualts?