Where the NUMA topology is read from: /sys. STRATA_TEST_SYSFS_ROOT= reads /devices/system/{node,cpu} instead, so a test can give the pool a made-up two-node machine (pool_tasks_test); nobody sets it for real.
| 669 | // Where the NUMA topology is read from: /sys. STRATA_TEST_SYSFS_ROOT=<dir> reads <dir>/devices/system/{node,cpu} instead, |
| 670 | // so a test can give the pool a made-up two-node machine (pool_tasks_test); nobody sets it for real. |
| 671 | std::string sysfs_root() { |
| 672 | const char* e = std::getenv("STRATA_TEST_SYSFS_ROOT"); |
| 673 | return e != nullptr && *e != '\0' ? std::string(e) : std::string("/sys"); |
| 674 | } |
| 675 | |
| 676 | // The NUMA node of a logical CPU (sysfs), or -1. |
| 677 | int cpu_numa_node(int cpu) { |
no test coverage detected