[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241127230547.2047716-1-david.hunter.linux@gmail.com>
Date: Wed, 27 Nov 2024 18:05:47 -0500
From: David Hunter <david.hunter.linux@...il.com>
To: rostedt@...dmis.org
Cc: david.hunter.linux@...il.com,
javier.carrasco.cruz@...il.com,
linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org,
masahiroy@...nel.org,
shuah@...nel.org,
David.hunter.linux@...il.com
Subject: Re: [PATCH v3 0/7] streamline_config.pl: fix: process configs set to "y"
From: David.hunter.linux@...il.com
I think that there are 2 distinct reasons that a module should not be turned off when using the 'localmodconfig' command.
1) the module is used directly
2) the module is needed for another module that has been included in the kernel with a "y".
I think we both agree on the first reason, but we may be having a disagreement/miscommunication for reason 2.
> For example:
>
> BCACHEFS_FS n -> m
>
> Why is that needed?
With regards to your question, I see that 'CLOSURES' is set to 'y' in your original .config file. 'BCACHEFS_FS' selects 'CLOSURES'. I suspect that if 'BCACHEFS_FS' is set to 'n', then your config would have no way of keeping 'CLOSURES' as 'y'.
I understand that the following patch is not suitable for upstream; however, the following patch might help you to understand a little bit more about each config options like 'BCACHEFS_FS'.
https://lore.kernel.org/all/20241014141345.5680-5-david.hunter.linux@gmail.com/
If you put in
dprintvar("BCACHEFS_FS);
you would be able to see what selects 'BCACHEFS_FS' and what is selected by 'BCACHEFS_FS'. I suspect that if you were to use it for each of the config options that you have questions about, you would likely see that each config option set to "m" has a "y" option that it selects. The question then would be is the "y" option actually required for your particular machine.
This brings us to the root cause of the issue that we are having: there is no way to know if a config option set to 'y' is actually required. If there was a way to tell if 'CLOSURES' is needed, we can easily determine whether BCACHEFS_FS is actually necessary.
Without knowing whether the 'y' options are needed, we then have to make a determination whether it is better to have the (potentially necessary) 'y' options with the extra (not directly used) 'm' options or to drop those 'y' options along with those 'm' options.
My argument is that the 'y' options are important, even if we cannot determine whether they are used or not. The problem I had that made me aware of the issues with localmodconfig was that my new computer would consistently do an emergency shutdown whenever I would try to compile the kernel. I eventually realized that the fan was not being recognized, so my workaround was to put the BIOS in control of the fan (instead of the kernel).
It was not until I realized that I had a few hardware devices that were not being recognized that I was able to pinpoint the root cause of the problem. For clarity, some of my hardware devices that were nonfunctional were USBs, the microphone, Bluetooth (and as mentioned earlier, the fan).
I am curious to know if there are any hardware devices that are not recognized on your computer after you use localmodconfig. One way to check is to use use 'ls' on the psuedofilesystem or to use any of the commands (like lspci) that recognize hardware.
I do not know whether any of your hardware requires the 'CLOSURES' config, but because someone's hardware MAY need it, my reasoning is that streamline_config.pl should include 'BCACHEFS_FS' if it is the only thing that selects another config opiton set to 'y'.
On my computer, when all of these configs set to 'm' are added (because of reason 2), all of my hardware works (including the Bluetooth, microphone, and USBs.
If, on the other hand, you still feel like it would be better to not include these particular config options, I would ask that you allow a command line option like '-s' or '--safe' that users could use to make the config file with the added modules.
Powered by blists - more mailing lists