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_1684783523

So @hpa1 created this script at my request.

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

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

I've just answered 2. in the other thread below, so let me try to answer 1.
here.

The current way the redhat/configs/ dir / config-system works does not lend
itself well to easily make big changes and it also does not really match with
the mental model which I have of the kind of changes which I would like to
make to reduce Fedora's kernel size.

I asked Kate to make this script because I basically want to be able to
specify an allow list for drivers in a certain subdir (e.g. drivers/iio/accel)
. I have done a lot of work on x86 tablets so I know exactly which drivers are
actually necessary and which ones are not.

So to me the primary purpose of this script is to actually be able to express
what I want: "only build these drivers" in a format which actually matches
what I'm trying to express and then have this script translate this to the
less then user-friendly redhat/configs/ "config-system" .

The current x86_accel_allow file really is just the beginning and once this is
in place I plan to add quite a few more, for starters at least for all the
other subdirs under drivers/iio and also for drivers/regulators. Where there
will be a single squashed commit for e.g. adding the new x86_iio_light allow
file together with the results of running the script with that file for the
first time.

To me the script is just a way of being able to focus any time spend on this
on what actually matters: "which drivers should stay enabled?" without having
to spend a lot of time on the mechanism of then implementing the change once
that question is answered.

Now to answer the various rightfully asked questions:

> How is the allow list maintained? Where is the information pulled from?

I'm afraid the answer to that is maintained manually and the information comes
from a domain expert. IOW the information comes from my brain (a mix of
disabling spi/i2c drivers without an acpi_match_table + being aware of some
exceptions).

I do actually hope that having x86_disable_unused_drivers.py available may
also help with experts of other parts of the kernel doing something similar
for e.g. nic / switch drivers.

> The script itself is not a bad idea, but it can not be run again after the
next merge window unless someone, or ideally some automated process, can
update the allow_list.

Right the plan here is for separate subdir allow-list files to have a
maintainer (me in this case) who say after rc2 is out runs the script on
kernel-ark/os-build. Followed by manually looking at what the script disables
and then either submits the results or updates the allow_list (or a mix of
both). Since the upstream Kconfig does not really attempt to limit which
drivers can be build on an arch to hw which are actually used in designs for
that arch.

And if that allow-list maintainer somehow misses a cycle then we just move
forward as before with some extra driver enabled and hopefully the next cycle
they do get around to it and also disable some drivers which were enabled
unnecessarily in the previous cycle.

Basically the idea behind the script is to make it easier to not just make
this size reduction a one time thing, but to also actually maintain this over
time. But this will still need *active *maintenance, with as fallback the old
model of just enabling all the drivers.
--
_______________________________________________
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