|
Squid Web Cache master
|
cpu affinity management for a single process More...
#include <CpuAffinitySet.h>
Public Member Functions | |
| CpuAffinitySet () | |
| void | apply () |
| set CPU affinity for this process | |
| void | undo () |
| undo CPU affinity changes for this process | |
| bool | applied () |
| whether apply() was called and was not undone | |
| void | set (const cpu_set_t &aCpuSet) |
| set CPU affinity mask | |
Private Attributes | |
| cpu_set_t | theCpuSet |
| configured CPU affinity for this process | |
| cpu_set_t | theOrigCpuSet |
| CPU affinity for this process before apply() | |
Definition at line 15 of file CpuAffinitySet.h.
| CpuAffinitySet::CpuAffinitySet | ( | ) |
Definition at line 20 of file CpuAffinitySet.cc.
References CPU_ZERO, theCpuSet, and theOrigCpuSet.
| bool CpuAffinitySet::applied | ( | ) |
Definition at line 72 of file CpuAffinitySet.cc.
References CPU_COUNT, and theOrigCpuSet.
| void CpuAffinitySet::apply | ( | ) |
Definition at line 27 of file CpuAffinitySet.cc.
References applied(), CPU_AND, CPU_COUNT, CPU_ZERO, DBG_IMPORTANT, debugs, Must, sched_getaffinity(), sched_setaffinity(), theCpuSet, theOrigCpuSet, and xstrerr().
Referenced by CpuAffinityInit().
| void CpuAffinitySet::set | ( | const cpu_set_t & | aCpuSet | ) |
Definition at line 81 of file CpuAffinitySet.cc.
References theCpuSet.
Referenced by CpuAffinityMap::calculateSet().
| void CpuAffinitySet::undo | ( | ) |
Definition at line 58 of file CpuAffinitySet.cc.
References applied(), CPU_ZERO, DBG_IMPORTANT, debugs, sched_setaffinity(), theOrigCpuSet, and xstrerr().
Referenced by CpuAffinityReconfigure().
|
private |
Definition at line 33 of file CpuAffinitySet.h.
Referenced by CpuAffinitySet(), apply(), and set().
|
private |
Definition at line 34 of file CpuAffinitySet.h.
Referenced by CpuAffinitySet(), applied(), apply(), and undo().