Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Feature Scattering in the Large: A Longitudinal...

Feature Scattering in the Large: A Longitudinal Study of Linux Kernel Device Drivers (Modularity 2015) - Best Paper Award (slides and presentation by L. Passos)

Feature code is often scattered across wide parts of the code base. But, scattering is not necessarily bad if used with care—in fact, systems with highly scattered features have evolved successfully over years. Among others, feature scattering allows developers to circumvent limitations in programming languages and system design. Still, little is known about the characteristics governing scattering, which factors influence it, and practical limits in the evolution of large and long-lived systems. We address this issue with a longitudinal case study of feature scattering in the Linux kernel. We quantitatively and qualitatively analyze almost eight years of its development history, focusing on scattering of device-driver features. Among others, we show that, while scattered features are regularly added, their proportion is lower than non-scattered ones, indicating that the kernel architecture allows most features to be integrated in a modular manner. The median scattering degree of features is constant and low, but the scattering-degree distribution is heavily skewed. Thus, using the arithmetic mean is not a reliable threshold to monitor the evolution of feature scattering. When investigating influencing factors, we find that platform-driver features are 2.5 times more likely to be scattered across architectural (subsystem) boundaries when compared to nonplatform ones. Their use illustrates a maintenance-performance trade-off in creating architectures as for Linux kernel device drivers

ASERG, DCC, UFMG

March 18, 2015
Tweet

More Decks by ASERG, DCC, UFMG

Other Decks in Research

Transcript

  1. Feature Scattering in the Large: A Longitudinal Study of Linux

    Kernel Device Drivers Leonardo Passos [email protected] University of Waterloo Canada Modularity’15 Research Track 1 Krzysztof Czarnecki [email protected] University of Waterloo Canada Thorsten Berger [email protected] University of Waterloo Canada Sven Apel [email protected] University of Passau Germany Jesús Padilla [email protected] University of Waterloo Canada Marco Tulio Valente [email protected] Federal University of Minas Gerais Brazil
  2. 4

  3. 10 Many large & long-lived software systems have shown that

    is possible to continuously-evolve in the face of feature scattering axTLS Coreboot SeaBIOS FreeBSD
  4. However, no empirical study has investigated feature scattering in the

    evolution of large and long-lived systems 11
  5. Such kind of studies are key in creating a general

    theory on how to effectively manage feature scattering 12
  6. 13 Scattering How could a theory help? Scattering is harmful

    Scattering is not necessarily bad (easy & cheap solution)
  7. A feature is locally scattered when its referring ifdefs are

    restricted to files in the driver subsystem only 27
  8. A feature is globally scattered when there is at least

    one referring ifdef in a file outside the driver subsystem 28
  9. 31

  10. Group 1 (low SD): SD ≤ 4 37 50% of

    scattered-driver features
  11. 38 Group 2 (medium SD): 5 ≤ SD ≤ 8

    25% of scattered-driver features
  12. 39 Group 3 (high SD): SD > 8 Non-outliers: ~

    22.5% Outliers: ~ 2.5% (max SD = 377)
  13. 42 % of scattered-driver features ~ 18% % of globally

    scattered-driver features ≤ 43% SD is not defined by a single absolute value, although most features (75%) have SD ≤ 8
  14. 43 75% of scattered-driver features have SD ≤ 8 no

    more than 25% of features have SD > 8 (relative limit)
  15. Platform-driver features: features whose drivers support devices that cannot be

    discovered by the CPU 45 Infrastructure-driver features: abstractions in the O.S domain (e.g., ACPI)
  16. The analyses of a random-sample shows statistically significant results :

    46 Platform-driver features are 2.5x more likely to being globally scattered than non-platform ones
  17. 47 In the sample, global scattering of platform-driver features occurs

    mostly in the arch subsystem Tight relationship between platform- driver features and CPU-dependent code (hard to modularize)
  18. 49 In general, there is no relationship between being a

    platform-driver or infrastructure feature in scattering degree
  19. 53 In the Linux kernel Most driver features are not

    scattered (~ 82%) C-language modularity constructs + the kernel plugin-based architecture are “good enough”
  20. 54 In the Linux kernel When the existing solutions are

    not good enough, developers scatter features in code
  21. 57 Conduct interviews Are the observed limits consciously enforced in

    practice? If so, how, and how were they set-up?
  22. 58 If not, why do they occur? Do they indirectly

    stem from some development practice or process?
  23. 59 Investigate whether the limits we found also apply to

    other systems (ongoing collaborative work)