mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
base: Added RPC to allow to change affinity of CPU and TOPO session after creation. This is necessary, as a cell might be pushed out of its original CPU region by Hoitaja.
This commit is contained in:
@@ -42,6 +42,10 @@ struct Genode::Cpu_session_client : Rpc_client<Cpu_session>
|
||||
Affinity::Space affinity_space() const override {
|
||||
return call<Rpc_affinity_space>(); }
|
||||
|
||||
void move(const Affinity::Location loc) override {
|
||||
call<Rpc_move>(loc);
|
||||
}
|
||||
|
||||
Dataspace_capability trace_control() override {
|
||||
return call<Rpc_trace_control>(); }
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Genode { struct Cpu_connection; }
|
||||
|
||||
struct Genode::Cpu_connection : Connection<Cpu_session>, Cpu_session_client
|
||||
{
|
||||
enum { RAM_QUOTA = 36*1024 };
|
||||
enum { RAM_QUOTA = 72*1024 };
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@@ -138,6 +138,12 @@ struct Genode::Cpu_session : Session
|
||||
*/
|
||||
virtual Affinity::Space affinity_space() const = 0;
|
||||
|
||||
/**
|
||||
* @brief Update affinity location of this CPU session
|
||||
*
|
||||
*/
|
||||
virtual void move(const Genode::Affinity::Location ) = 0;
|
||||
|
||||
/**
|
||||
* Translate generic priority value to kernel-specific priority levels
|
||||
*
|
||||
@@ -249,6 +255,7 @@ struct Genode::Cpu_session : Session
|
||||
GENODE_RPC(Rpc_migrate_thread, void, migrate_thread, Thread_capability, Affinity::Location);
|
||||
GENODE_RPC(Rpc_exception_sigh, void, exception_sigh, Signal_context_capability);
|
||||
GENODE_RPC(Rpc_affinity_space, Affinity::Space, affinity_space);
|
||||
GENODE_RPC(Rpc_move, void, move, Affinity::Location);
|
||||
GENODE_RPC(Rpc_trace_control, Dataspace_capability, trace_control);
|
||||
GENODE_RPC(Rpc_ref_account, int, ref_account, Cpu_session_capability);
|
||||
GENODE_RPC(Rpc_transfer_quota, int, transfer_quota, Cpu_session_capability, size_t);
|
||||
@@ -257,7 +264,7 @@ struct Genode::Cpu_session : Session
|
||||
|
||||
GENODE_RPC_INTERFACE(Rpc_create_thread, Rpc_kill_thread, Rpc_exception_sigh,
|
||||
Rpc_affinity_space, Rpc_trace_control, Rpc_ref_account,
|
||||
Rpc_transfer_quota, Rpc_quota, Rpc_native_cpu, Rpc_migrate_thread);
|
||||
Rpc_transfer_quota, Rpc_quota, Rpc_native_cpu, Rpc_migrate_thread, Rpc_move);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -41,4 +41,9 @@ struct Genode::Topo_session_client : Rpc_client<Topo_session>
|
||||
unsigned node_count() override {
|
||||
return call<Rpc_node_count>();
|
||||
}
|
||||
|
||||
void reconstruct(const Affinity affinity) override
|
||||
{
|
||||
call<Rpc_reconstruct>(affinity);
|
||||
}
|
||||
};
|
||||
@@ -49,10 +49,12 @@ struct Genode::Topo_session : Session
|
||||
virtual Topology::Numa_region node_affinity_of(Affinity::Location const &) = 0;
|
||||
virtual Topology::Numa_region node_at_id(unsigned node_id) = 0;
|
||||
virtual unsigned node_count() = 0;
|
||||
virtual void reconstruct(const Affinity) = 0;
|
||||
|
||||
GENODE_RPC(Rpc_node_affinity, Topology::Numa_region, node_affinity_of, Affinity::Location const &);
|
||||
GENODE_RPC(Rpc_node_id, Topology::Numa_region, node_at_id, unsigned);
|
||||
GENODE_RPC(Rpc_node_count, unsigned, node_count);
|
||||
GENODE_RPC(Rpc_reconstruct, void, reconstruct, Affinity);
|
||||
|
||||
GENODE_RPC_INTERFACE(Rpc_node_affinity, Rpc_node_id, Rpc_node_count);
|
||||
GENODE_RPC_INTERFACE(Rpc_node_affinity, Rpc_node_id, Rpc_node_count, Rpc_reconstruct);
|
||||
};
|
||||
Reference in New Issue
Block a user