20 if (aProcesses.size() != aCores.size())
23 for (
size_t i = 0; i < aProcesses.size(); ++i) {
24 const int process = aProcesses[i];
25 const int core = aCores[i];
26 if (process <= 0 || core <= 0)
42 if (process == targetProcess) {
45 "'cpu_affinity_map' for process number " << process <<
46 ", using the last core seen: " <<
theCores[i]);
57 cpuAffinitySet->
set(cpuSet);
59 return cpuAffinitySet;
CpuAffinitySet * calculateSet(const int targetProcess) const
calculate CPU set for this process
bool add(const std::vector< int > &aProcesses, const std::vector< int > &aCores)
append cpu_affinity_map option
std::vector< int > theProcesses
list of process numbers
std::vector< int > theCores
list of cores
cpu affinity management for a single process
void set(const cpu_set_t &aCpuSet)
set CPU affinity mask
#define CPU_SET(cpunum, cpuset)
#define debugs(SECTION, LEVEL, CONTENT)