A Study of Feature Scattering in the Linux Kernel

Citation Author(s):
Leonardo
Passos
University of Waterloo, Canada
Rodrigo
Queiroz
University of Waterloo, Canada
Mukelabai
Mukelabai
University of Gothenburg, Sweden
Thorsten
Berger
University of Gothenburg, Sweden
Sven
Apel
University of Passau, Germany
Krzysztof
Czarnecki
University of Waterloo, Canada
Jesús
Padilla
SAP Waterloo, Canada
Submitted by:
Mukelabai Mukelabai
Last updated:
Wed, 12/12/2018 - 10:01
DOI:
10.21227/3fak-qz51
Data Format:
Links:
License:
166 Views
Categories:
Keywords:
0
0 ratings - Please login to submit your rating.

Abstract 

Feature code is often scattered across a software system. Scattering is not necessarily bad if used with care, as witnessed by systems with highly scattered features that evolved successfully. Feature scattering, often realized with a pre-processor, circumvents limitations of programming languages and software architectures. Unfortunately, little is known about the principles governing scattering in large and long-living software systems. We present a longitudinal study of feature scattering in the Linux kernel, complemented by a survey with 74, and interviews with nine Linux kernel developers. We analyzed almost eight years of the kernel's history, focusing on its largest subsystem: device drivers. We learned that the ratio of scattered features remained nearly constant and that most features were introduced without scattering. Yet, scattering easily crosses subsystem boundaries, and highly scattered outliers exist. Scattering often addresses a performance-maintenance tradeoff (alleviating complicated APIs), hardware design limitations, and avoids code duplication. While developers do not consciously enforce scattering limits, they actually improve the system design and refactor code, thereby mitigating pre-processor idiosyncrasies or reducing its use.

Instructions: 

 A Study of Feature Scattering in the Linux Kernel

Scattering database

    • Our longitudinal study is based on a feature-oriented analysis of the Linux kernel git repository. Using a custom made tool (see infrastructure), we convert the kernel git repository into a relational database, which we make available for download (scatdb_dump.zip).

    Sample classification and criteria

      •  Classification of a sample of scattered driver features (scat_grps.ods)
      •   Classification of all outlier features (outliers.ods)
      • The classification procedure of features as infrastructure or platform is documented here (criteria.tar.gz).

       

      All the documents made available in this section are compatible with Open Office: odt (for text documents) and ods (for spreadsheet documents).

       

      Infrastructure

      To create and analyze features in the Linux kernel, we rely on the following tools:
      • scat_linux (scat_linux_db.zip): a tool that, given a snapshot of a Linux kernel repository, generates a database with scattering information of Kconfig features (configuration options).
      • kconfig_info (kconfig_info.zip): a tool to recover information relative to a single feature.
      • A set of helper scripts in R and Bash, which can be downloaded from here (scripts.tar.gz).

      Survey and Interviews

       A summary report of the survey data is located in the survey folder and the interview guide is simiarly located in the interviews folder