8ef09fdc50
Add an option to automatically discover the host's NUMA and CPU counts and use those values for a non cross-build. Give users the option to override the per-arch default values or values from cross files by specifying them on the command line with -Dmax_lcores and -Dmax_numa_nodes. Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: David Christensen <drc@linux.vnet.ibm.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 lines
139 B
Python
8 lines
139 B
Python
#!/usr/bin/env python3
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
# Copyright (c) 2021 PANTHEON.tech s.r.o.
|
|
|
|
import os
|
|
|
|
print(os.cpu_count())
|