SWDEV-322225 - Use numa_allocate_bitmask
- Fix a crash with AMD_CPU_AFFINITY=1 as numa_bitmask_alloc isnt the right api to allocate bitmask - Do not set affinity for ROCr thread. It worsens performance rather than any improvement. - Fix regression from my previous change for event handler. Change-Id: I3ea75adc2a6333f29752283eddd5b555e9b58cc5
This commit is contained in:
@@ -310,11 +310,8 @@ void Os::setCurrentThreadName(const char* name) { ::prctl(PR_SET_NAME, name); }
|
||||
|
||||
void Os::setPreferredNumaNode(uint32_t node) {
|
||||
#ifdef ROCCLR_SUPPORT_NUMA_POLICY
|
||||
if (AMD_CPU_AFFINITY) {
|
||||
// Set preferred node affinity mask
|
||||
int num_cpus = numa_num_configured_cpus();
|
||||
bitmask* bm = numa_bitmask_alloc(num_cpus);
|
||||
|
||||
if (AMD_CPU_AFFINITY && (numa_available() >= 0)) {
|
||||
bitmask* bm = numa_allocate_cpumask();
|
||||
numa_node_to_cpus(node, bm);
|
||||
if (numa_sched_setaffinity(0, bm) < 0) {
|
||||
assert(0 && "failed to set affinity");
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user