-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mpi(hwloc): spin-lock receiver threads and pin to a core
- Loading branch information
1 parent
d94f61a
commit 7ad4144
Showing
25 changed files
with
467 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,5 +31,7 @@ class RecvSocket | |
int port; | ||
|
||
std::deque<int> openConnections; | ||
|
||
void setSocketOptions(int connFd); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
#include <pthread.h> | ||
|
||
namespace faabric::util { | ||
|
||
const int NO_CPU_IDX = -1; | ||
const int GHA_CPU_IDX = -2; | ||
|
||
class FaabricCpuSet | ||
{ | ||
public: | ||
FaabricCpuSet(int cpuIdxIn = NO_CPU_IDX); | ||
FaabricCpuSet& operator=(const FaabricCpuSet&) = delete; | ||
FaabricCpuSet(const FaabricCpuSet&) = delete; | ||
|
||
~FaabricCpuSet(); | ||
|
||
cpu_set_t* get() { return &cpuSet; } | ||
|
||
private: | ||
cpu_set_t cpuSet; | ||
|
||
// CPU index in internal CPU accounting | ||
int cpuIdx = NO_CPU_IDX; | ||
}; | ||
|
||
// Pin thread to any "unpinned" CPUs. Returns the CPU set it was pinned to. | ||
// We return a unique pointer to enforce RAII on the pinned-to CPU | ||
std::unique_ptr<FaabricCpuSet> pinThreadToFreeCpu(pthread_t thread); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.