[PATCH 9/9] kernel/x86: remove DRM support

Elliott Mitchell ehem+openwrt at m5p.com
Fri Apr 28 20:45:55 PDT 2023


On Thu, Apr 27, 2023 at 11:21:28AM +0200, Thibaut wrote:
> 
> > Le 27 avr. 2023 à 02:11, Elliott Mitchell <ehem+openwrt at m5p.com> a écrit :
> > 
> > On Thu, Apr 27, 2023 at 12:50:52AM +0200, Stefan Lippers-Hollmann wrote:
> >> On 2023-04-19, Elliott Mitchell wrote:
> >>> Direct Rendering Manager is mainly for running X (possibly Wayland
> >>> too).  As OpenWRT is meant for networking devices, there is no need
> >>> for the support to be present.
> >> 
> >> That is only partially true, the Linux kernel is making a strong push
> >> away from deprecated (FB_*) graphics drivers to DRM based ones, with 
> >> kernel based mode setting this is getting more (any) attention for 
> >> console support as well. Even without getting anywhere near X/ Wayland,
> >> there is more than just a 80x25 tty on real hardware (and even VMs).
> > 
> > Real x86 hardware often has the capability to use a serial port as
> > console.  The conventional UEFI implementation fully supports this use
> > case.  I can well believe a number of manufacturers disabling the
> > functionality though.
> > 
> > VMs *can* have more than a 80x25 tty.  By the time you're getting to 4
> > or more VMs you should be thinking about disabling the functionality due
> > to the heavy overhead (unless the OS in the VM doesn't support serial
> > consoles).
> 
> You seem to assume that x86 is only/mainly run on VMs.
> That is not necessarily the case, and I see no reason to degrade device support that way.

Okay, as already stated there are at least two solutions to this.

1> Turn most functionality into modules and include support for runtime
loading of kernel modules.

2> Create more kernel variants for OpenWRT/x86.


> Would you mind documenting the measurable gains from your changes, so we have some metric to assess their relevance?
> 

I had suspected as much, but fully disabling ISA DMA didn't directly
have much impact (less than 4195 byte reduction).  I was already guessing
most of the gain was CONFIG_ISA=n, but hoped purging ISA DMA might
squeeze out a bit more.

Removing AGP shrunk vmlinux.bin by 4KB.  Since the kernel is a multiple
of page size, this means a reduction of 1-8191 bytes.  This though may
have translated into a larger impact when CONFIG_DRM was set to no.

Setting CONFIG_DRM=n resulted in a vmlinux.bin delta of -2203648 bytes.
Not quite a 10% reduction in kernel runtime size, but close.  Here we
have a major impact on kernel size.

Removing USB support is certainly inappropriate for a desktop build, but
appropriate for something using a serial console (some types of VM).
That has a delta of -2117632 bytes.

Looks like Hyper-V support is a pig.  I'm merely going from the size of
handy distribution modules, but appears to need ~1MB of memory.

Again going by handy distribution modules, the Fusion MPT used by
VMware is closer to ~350KB (not including the need for the SCSI layer).

Xen meanwhile is ~200KB total.


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg at m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445





More information about the openwrt-devel mailing list