SUSE Revives Patches For Exposing /proc/cpuinfo Data Over Sysfs
Back in 2017 were patches for exposing /proc/cpuinfo data via sysfs for more easily parsing selected bits of information from the CPU information output. That work never made it into the mainline kernel but now SUSE's Thomas Renninger is taking over and trying to get revised patches into the kernel.
Renninger sent out revised versions of the "sysfs-based cpuinfo" on Friday that within /sys/devices/system/cpu/cpuX/info/ would expose nodes to easily parse pieces of cpuinfo like bogomips, cpu_family, flags, model, model_name, stepping, vendor_id, and more. Reading the information via sysfs with a single-value-per-file makes it much easier for parsing compared to having to parse the entire /proc/cpuinfo output and complements other CPU information already accessible via the very convenient sysfs.
The new patches have found some flaws under the review so far but hopefully this SUSE engineer will get the work cleaned up and merged potentially for Linux 5.6 next year for easier parsing by scripts/programs than the full /proc/cpuinfo output. For those preferring the complete /proc/cpuinfo output, fear not that no changes are expected there.
Renninger sent out revised versions of the "sysfs-based cpuinfo" on Friday that within /sys/devices/system/cpu/cpuX/info/ would expose nodes to easily parse pieces of cpuinfo like bogomips, cpu_family, flags, model, model_name, stepping, vendor_id, and more. Reading the information via sysfs with a single-value-per-file makes it much easier for parsing compared to having to parse the entire /proc/cpuinfo output and complements other CPU information already accessible via the very convenient sysfs.
The new patches have found some flaws under the review so far but hopefully this SUSE engineer will get the work cleaned up and merged potentially for Linux 5.6 next year for easier parsing by scripts/programs than the full /proc/cpuinfo output. For those preferring the complete /proc/cpuinfo output, fear not that no changes are expected there.
14 Comments