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_CPU_AFFINITY_MAP_H
10#define SQUID_CPU_AFFINITY_MAP_H
11
12#include <vector>
13
14class CpuAffinitySet;
15
18{
19public:
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
32private:
33 std::vector<int> theProcesses;
34 std::vector<int> theCores;
35};
36
37#endif // SQUID_CPU_AFFINITY_MAP_H
38
stores cpu_affinity_map configuration
const std::vector< int > & processes() const
returns list of process numbers
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
const std::vector< int > & cores() const
returns list of cores
std::vector< int > theProcesses
list of process numbers
std::vector< int > theCores
list of cores
cpu affinity management for a single process

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors