Re: [OS-BUILD PATCH 0/0] redhat: scripts: An automation script for disabling unused driver for x86

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

 



From: Hans de Goede on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2832#note_1684724074

So @hpa1 created this script at my request.

Looking at the discussions above it seems there are 2 separate discussion
points:

1. Why disable these drivers
2. Why use a script

Let me try to explain 2. here in reply to "I believe Fedora purposely enables
all drivers for an arch".

There are a lot of drivers enabled in the Fedora x86 kernels for components
which are simply never used in x86 designs and disabling these drivers gives a
number of benefits:

1. Significantly reduce the kernel package size saving mirror diskspace and
bandwidth
2. Significantly reduce the diskspace used by /lib/modules
3. Reduce kernel build times

"I believe Fedora purposely enables all drivers for an arch" suggests that the
kernel Kconfig itself does a good job of only allowing drivers to be build on
archs where the drivers are actually relevant, which unfortunately most
Kconfig entries do not even not try.

E.g. there are a ton of drivers for i2c and spi attached chips which do not
support ACPI enumeration, yet barring some special exceptions ACPI enumeration
is the only way for an i2c or spi device to which such a driver can bind can
be instantiated on x86.

So compiling i2c or spi drivers which do not have an acpi_match_table is
basically useless since there never will be e.g an i2c_client instantiated to
which these drivers can bind.

So basically the idea here is to limit the kernel configuration from "enables
all drivers for an arch" to "enable all drivers which can actually be used on
an arch".

The drivers/iio/accel config changes here are really just an example of what I
have in mind to do for many different drivers subdirs and in this example it
reduces the amount of .ko files build under drivers/iio/accel from 33 to just
12. There are other cases like other iio subdirs, but also drivers/regulators
where I plan to submit similar changes. Which together should result in
significant savings.
--
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux