Tony Lindgren: kernel data bloat and how to avoid it (ARM)

August 2, 2013

Participants: Tony Lindgren, Greg KH, Jason Cooper, Russell King, Mel Gorman.

People tagged: (none)

Tony Lindgren called out kernel data bloat as an issue for ARM systems, but believes that it is also a problem for other architectures and called for a discussion. Greg KH questioned whether this was really specific to ARM, but asked for more details on what constitutes bloat. Tony replied that ARM had special problems due to the lack of discoverable busses, but agreed that other platforms might also suffer from bloat. Tony is particularly concerned about replication of common state for similar drivers for slightly different devices, arguing that only a minimal set of data should be linked statically in the kernel and that the remainder should come from device tree, ACPI tables, and /lib/firmware. Mel Gorman asked if a scripts/bloat-o-meter would help. Greg asked what the memory-size impact of this was. Tony said that similar consolidation efforts had removed thousands of lines of kernel code, and further that the issue was more with frameworks used by device drivers rather than the drivers themselves, calling out clocks, regulators, and muxes, which might be replicated tens or hundreds of times for each given SoC.

Russell King argued that the underlying problem was maintainers failing to reject patches that induce bloat, especially given that a generic solution often already exists.