Merge pull request #7590 from vjpai/affinity_optional

Don't assert if we're not able to set CPU affinity
pull/5803/head^2
Vijay Pai 8 years ago committed by GitHub
commit 18983f8e38
  1. 4
      test/cpp/qps/limit_cores.cc

@ -68,9 +68,9 @@ int LimitCores(const int* cores, int cores_size) {
cores_set++;
}
}
GPR_ASSERT(sched_setaffinity(0, size, cpup) == 0);
bool affinity_set = (sched_setaffinity(0, size, cpup) == 0);
CPU_FREE(cpup);
return cores_set;
return affinity_set ? cores_set : num_cores;
}
} // namespace testing

Loading…
Cancel
Save