CPU/memory affinity info missing
Bug #1251209 reported by
Dave Love
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
procenv |
Fix Released
|
Undecided
|
James Hunt |
Bug Description
There's currently no report of CPU/memory affinity I can see.
It's probably useful at least to report the cpus_allowed_list and mems_allowed_list from
proc's status file on Linux, but it would be better to use the hwloc library to report it portably
in terms of logical topology, if you don't mind the extra dependency. I could do an
hwloc version.
Changed in procenv: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Hi Dave,
> There's currently no report of CPU/memory affinity I can see.
You're right!
> It's probably useful at least to report the cpus_allowed_list and ty()).
> mems_allowed_list from proc's status file on Linux, but it would be
> better to use the hwloc library to report it portably
> in terms of logical topology, if you don't mind the extra dependency. I
> could do an hwloc version.
I've now got some code to display cpu affinity (using sched_getaffini
NUMA looks slightly more awkward for 2 reasons:
1) Although I've got some code that uses get_mempolicy(), that syscall requires libnuma (!) seemingly in my case only to give
the correct platform-specific syscall number for get_mempolicy(). This seems to be somewhat overkill but I'll take a closer
look tomorrow.
2) Testing: get_mempolicy() returns ENOSYS on non-NUMA systems (like mine :) Do you have access to NUMA hardware?
Would the above suffice do you think or is there a compelling reason to use libhwloc? As you've deduced, I'm trying to minimise dependencies on additional libraries. That said, I don't want to reinvent too many wheels and have been wondering about libcpuid for displaying proper virtualisation details (although this doesn't seem to be widely packaged yet).