Merge pull request #165 from yeyunfeng-dev/master
log correctly for isolated and nohz_full cpus
This commit is contained in:
commit
97731241f5
|
@ -112,9 +112,6 @@ static void setup_banned_cpus(void)
|
||||||
cpumask_t isolated_cpus;
|
cpumask_t isolated_cpus;
|
||||||
char *env = NULL;
|
char *env = NULL;
|
||||||
|
|
||||||
cpus_clear(isolated_cpus);
|
|
||||||
cpus_clear(nohz_full);
|
|
||||||
|
|
||||||
/* A manually specified cpumask overrides auto-detection. */
|
/* A manually specified cpumask overrides auto-detection. */
|
||||||
if (cpu_ban_string != NULL && banned_cpumask_from_ui != NULL) {
|
if (cpu_ban_string != NULL && banned_cpumask_from_ui != NULL) {
|
||||||
cpulist_parse(banned_cpumask_from_ui,
|
cpulist_parse(banned_cpumask_from_ui,
|
||||||
|
@ -133,6 +130,9 @@ static void setup_banned_cpus(void)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cpus_clear(isolated_cpus);
|
||||||
|
cpus_clear(nohz_full);
|
||||||
|
|
||||||
path = "/sys/devices/system/cpu/isolated";
|
path = "/sys/devices/system/cpu/isolated";
|
||||||
process_one_line(path, get_mask_from_cpulist, &isolated_cpus);
|
process_one_line(path, get_mask_from_cpulist, &isolated_cpus);
|
||||||
|
|
||||||
|
@ -141,11 +141,11 @@ static void setup_banned_cpus(void)
|
||||||
|
|
||||||
cpus_or(banned_cpus, nohz_full, isolated_cpus);
|
cpus_or(banned_cpus, nohz_full, isolated_cpus);
|
||||||
|
|
||||||
out:
|
|
||||||
cpumask_scnprintf(buffer, 4096, isolated_cpus);
|
cpumask_scnprintf(buffer, 4096, isolated_cpus);
|
||||||
log(TO_CONSOLE, LOG_INFO, "Isolated CPUs: %s\n", buffer);
|
log(TO_CONSOLE, LOG_INFO, "Isolated CPUs: %s\n", buffer);
|
||||||
cpumask_scnprintf(buffer, 4096, nohz_full);
|
cpumask_scnprintf(buffer, 4096, nohz_full);
|
||||||
log(TO_CONSOLE, LOG_INFO, "Adaptive-ticks CPUs: %s\n", buffer);
|
log(TO_CONSOLE, LOG_INFO, "Adaptive-ticks CPUs: %s\n", buffer);
|
||||||
|
out:
|
||||||
cpumask_scnprintf(buffer, 4096, banned_cpus);
|
cpumask_scnprintf(buffer, 4096, banned_cpus);
|
||||||
log(TO_CONSOLE, LOG_INFO, "Banned CPUs: %s\n", buffer);
|
log(TO_CONSOLE, LOG_INFO, "Banned CPUs: %s\n", buffer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue