mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 15:18:20 +00:00
Express affinities via Cartesian coordinates
This patch introduces new types for expressing CPU affinities. Instead of dealing with physical CPU numbers, affinities are expressed as rectangles in a grid of virtual CPU nodes. This clears the way to conveniently assign sets of adjacent CPUs to subsystems, each of them managing their respective viewport of the coordinate space. By using 2D Cartesian coordinates, the locality of CPU nodes can be modeled for different topologies such as SMP (simple Nx1 grid), grids of NUMA nodes, or ring topologies.
This commit is contained in:
@ -150,8 +150,8 @@ namespace Genode {
|
||||
Thread_state state(Thread_capability);
|
||||
void state(Thread_capability, Thread_state const &);
|
||||
void exception_handler(Thread_capability, Signal_context_capability);
|
||||
unsigned num_cpus() const;
|
||||
void affinity(Thread_capability, unsigned);
|
||||
Affinity::Space affinity_space() const;
|
||||
void affinity(Thread_capability, Affinity::Location);
|
||||
|
||||
|
||||
/*******************************
|
||||
|
@ -114,7 +114,7 @@ namespace Genode {
|
||||
}
|
||||
|
||||
const char *name() { return _name; }
|
||||
void affinity(unsigned) { }
|
||||
void affinity(Affinity::Location) { }
|
||||
|
||||
/**
|
||||
* Register process ID and thread ID of thread
|
||||
|
Reference in New Issue
Block a user