CpuAffinityMap.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #ifndef SQUID_SRC_CPUAFFINITYMAP_H
10 #define SQUID_SRC_CPUAFFINITYMAP_H
11 
12 #include <vector>
13 
14 class CpuAffinitySet;
15 
18 {
19 public:
21  bool add(const std::vector<int> &aProcesses, const std::vector<int> &aCores);
22 
24  CpuAffinitySet *calculateSet(const int targetProcess) const;
25 
27  const std::vector<int> &processes() const { return theProcesses; }
28 
30  const std::vector<int> &cores() const { return theCores; }
31 
32 private:
33  std::vector<int> theProcesses;
34  std::vector<int> theCores;
35 };
36 
37 #endif /* SQUID_SRC_CPUAFFINITYMAP_H */
38 
std::vector< int > theCores
list of cores
std::vector< int > theProcesses
list of process numbers
bool add(const std::vector< int > &aProcesses, const std::vector< int > &aCores)
append cpu_affinity_map option
stores cpu_affinity_map configuration
cpu affinity management for a single process
const std::vector< int > & cores() const
returns list of cores
CpuAffinitySet * calculateSet(const int targetProcess) const
calculate CPU set for this process
const std::vector< int > & processes() const
returns list of process numbers

 

Introduction

Documentation

Support

Miscellaneous