Skip to content

Fix rapl subdomain only added once#71

Open
weriomat wants to merge 2 commits into
level1techs:mainfrom
weriomat:rapl_subdomain
Open

Fix rapl subdomain only added once#71
weriomat wants to merge 2 commits into
level1techs:mainfrom
weriomat:rapl_subdomain

Conversation

@weriomat

@weriomat weriomat commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Closes #70

[root@cpl siomon]# ./target/release/sio sensors
── cpu/rapl ──
  RAPL dram-0                                5.8 W
  RAPL dram-1                                5.8 W
  RAPL dram-2                                5.0 W
  RAPL dram-3                                4.0 W
  RAPL package-0                            52.0 W
  RAPL package-1                            57.0 W
  RAPL package-2                            49.7 W
  RAPL package-3                            51.0 W

We now take the first integer we find which should be the domain and append it to the RAPL subdomain name.

[root@cpl powercap]# cat /sys/class/powercap/intel-rapl:0:0/name
dram -> dram-0
[root@cpl powercap]# cat /sys/class/powercap/intel-rapl:3:0/name
dram -> dram-3

@weriomat
weriomat force-pushed the rapl_subdomain branch 2 times, most recently from 10c88e9 to 6ec8acb Compare July 10, 2026 18:47
Comment thread src/sensors/rapl.rs Outdated
@weriomat

Copy link
Copy Markdown
Contributor Author

On a side note, this change will affect single NUMA systems as well.

$ ls /sys/class/powercap/
intel-rapl  intel-rapl:0  intel-rapl:0:0
$ cat /sys/class/powercap/intel-rapl:0:0/name
core
$ sudo ./target/release/sio --direct-io --no-nvidia sensors
...
── cpu/rapl ──
  RAPL core-0                                1.1 W
  RAPL package-0                            32.8 W
...

If we want to have the name as core on a single NUMA system we could first look if we have multiple NUMA domains and decide based on that information if we need to append the RAPL domain number.

@weriomat
weriomat requested a review from emansom July 11, 2026 12:44
@weriomat weriomat mentioned this pull request Jul 13, 2026
@weriomat

Copy link
Copy Markdown
Contributor Author

Renamed parse_subdomain into parse_domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Rapl greedily selects dram consumption for first numa node

2 participants