Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cache architecture for core assignment #748

Open
PhilippWendler opened this issue Sep 21, 2021 · 2 comments · May be fixed by #892
Open

Use cache architecture for core assignment #748

PhilippWendler opened this issue Sep 21, 2021 · 2 comments · May be fixed by #892
Assignees
Labels
resource allocation related to allocation of resources like CPU cores and memory

Comments

@PhilippWendler
Copy link
Member

PhilippWendler commented Sep 21, 2021

BenchExec currently supports machines with several CPUs, CPUs with several NUMA nodes, NUMA nodes with several physical cores, and physical cores with several virtual cores. However, modern large CPUs add another layer: Certain cores of a NUMA node can share L3 cache, but have a separate L3 cache from other cores on the same NUMA node.

Example architectures:

For performance and determinism, it is better if on such machines, core allocation takes the cache architecture into account, such that cores that share cache are assigned preferably to a run.

We can read this information from /sys/devices/system/cpu/cpuX/topology/die_cpus_list (docs), which is next to the files we use for retrieving the other topology information.

We should cross-check with hwloc-ls and hwloc-info that we get it right.

@PhilippWendler PhilippWendler added the resource allocation related to allocation of resources like CPU cores and memory label Oct 26, 2022
@PhilippWendler
Copy link
Member Author

Actually, it seems that this is not what Linux calls the "die". We need some other way to distinguish such cases.

@PhilippWendler
Copy link
Member Author

Cache information is in /sys/devices/system/cpu/cpuX/cache/indexY/shared_cpu_list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resource allocation related to allocation of resources like CPU cores and memory
Development

Successfully merging a pull request may close this issue.

2 participants