Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
numactl.c: Refactor print_node_cpus to display CPU ranges
This commit refines the print_node_cpus function to enhance output readability, especially for systems with numerous CPUs. Initially, the function itemized each CPU, leading to potentially lengthy and cluttered outputs. With this update, the function now identifies and prints contiguous CPU ranges as hyphen-separated sequences (e.g., 1-4) instead of individual lists (e.g., 1 2 3 4), streamlining the display. Additionally, to provide a quick overview, a count of the total available CPUs is appended at the end of the output, allowing users to instantly grasp the total number without manual counting. While the output strategy underwent these improvements, the function's core logic, error-handling, and interactions with the NUMA library remain intact, ensuring reliability and consistency with previous behavior. Signed-off-by: Vishal Chourasia vishalc@linux.ibm.com
- Loading branch information