Re: [PATCH v3 0/7] streamline_config.pl: fix: process configs set to "y"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 27 Nov 2024 18:05:47 -0500
David Hunter <david.hunter.linux@xxxxxxxxx> wrote:

> From: David.hunter.linux@xxxxxxxxx
> 
> 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. 

Note, Linus uses make localmodconfig a lot. He didn't always, because he
complained that it would keep too many options enabled. I don't want to
suddenly have Linus's make localmodconfig blow up the options again. I can
see him complaining about it. Believe me, you don't want Linus to notice
this patch for the wrong reasons.

This is why I'm very concerned about things like BCACHEFS being enabled
after localmodconfig when there's obviously no reason for it. Even if it
enables CLOSURES. BCACHEFS is an filesystem that I don't use. It should not
be enabled on my machines.

> 
> > 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'.

Which is OK for this example.

> 
> 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@xxxxxxxxx/

Note, I'll try to remember to look at this after the Thanksgiving break.

> 
> 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.   

I would argue that if a 'y' depends on a 'm' then it's not needed unless
that 'y' is a dependency for other 'm's that are needed. We should look
into seeing if that's the case.

> 
> 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. 

I would say that CLOSURES is considered needed if a 'm' that is needed
depends on it. Otherwise, I would say no.

> 
> 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). 

Can you show the dependency change for those devices. Knowing what exactly
was disabled and knowing what was needed would be useful. That way we can
fix the actual problem without using a big hammer approach of just keeping
any module enabled that enables a 'y'.

> 
> 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'. 

BACHEFS is a new file system. If there's a dependency in my config that
requires it, that's a bug in the config.

> 
> 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. 

Let's first find out what the problem is. Remember, this is code that Linus
uses for his builds. Rule #1 I was told when I first became a kernel
developer was, "Whatever you do. Don't break Linus's workstation!"

-- Steve




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux