Skip to content

Commit 6195ce4

Browse files
committed
Give rdtset more configuration flexibility
Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
1 parent fc9453d commit 6195ce4

5 files changed

Lines changed: 185 additions & 73 deletions

File tree

conf/config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ run:
88
stressor: true
99
tests_path: "tests"
1010

11+
resctrl:
12+
- mask: "0x7ff0"
13+
cpus: "3"
14+
- mask: "0x7fff"
15+
cpus: "0,2,4,6,8,10,12,14"
16+
- mask: "0x000f"
17+
cpus: "1,5,7,9,11,13,15"
18+
1119
cpus:
1220
t_core: "3"
1321
enable_turbo: false

main.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def _run_caterpillar(
221221
"caterpillar:latest",
222222
"/bin/bash",
223223
"-c",
224-
f'stdbuf -oL -eL /usr/sbin/rdtset -t "l3={l3_cache_mask};cpu={t_core}" '
224+
f"stdbuf -oL -eL /usr/sbin/rdtset {self._compose_rdtset()} "
225225
f"-c {t_core} -k /opt/benchmarking/caterpillar/caterpillar -c {t_core} -s {self.config.caterpillar.n_cycles}",
226226
]
227227

@@ -509,6 +509,13 @@ def _start_stressor(self) -> None:
509509
except subprocess.CalledProcessError:
510510
print("Warning: Could not check stressor status")
511511

512+
def _compose_rdtset(self) -> str:
513+
ans = ""
514+
for group in self.config.run.resctrl:
515+
ans += f' -t "l3={group.mask};cpu={group.cpus}"'
516+
517+
return ans
518+
512519
@staticmethod
513520
def _run_command(cmd: List[str]) -> CompletedProcess | None:
514521
"""Run a command and return its exit code."""

notebook/02_Megabenchmark.ipynb

Lines changed: 128 additions & 72 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dependencies = [
1717
"pyextremes>=2.3.3",
1818
"pymc>=5.26.1",
1919
"pytest>=8.4.2",
20+
"scikit-learn>=1.7.2",
2021
"scipy>=1.16.3",
2122
"seaborn>=0.13.2",
2223
"statsmodels>=0.14.5",

uv.lock

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)