There's no point scanning all entries when /cpu doesn't exist in the
first place. Let's check once for it and skip the loop in this case.
* thread_set_id, cluster_id, l1/l2/l3 id, etc. We don't revisit entries
* already filled from the list provided by another CPU.
*/
+
+ if (!is_dir_present(NUMA_DETECT_SYSTEM_SYSFS_PATH "/cpu"))
+ goto skip_cpu;
+
for (cpu = 0; cpu <= cpu_topo_lastcpu; cpu++) {
struct hap_cpuset cpus_list;
int next_level = 1; // assume L1 if unknown
}
}
+ skip_cpu:
/* Now locate NUMA node IDs if any */
dir = opendir(NUMA_DETECT_SYSTEM_SYSFS_PATH "/node");