mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
sysconf(_SC_NPROCESSORS_CONF) (via get_nprocs_conf) reflects cpu_possible_mask, which is fixed at boot time, so querying it repeatedly is unnecessary. Replace multiple calls to sysconf(_SC_NPROCESSORS_CONF) with a single global nr_cpus variable initialized once at startup. `#pragma once` in timerlat_u.h is needed for pre-C23 compilers to avoid redefinition errors. Signed-off-by: Costa Shulyupin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tomas Glozar <[email protected]>