Attach affinity information to session requests

This patch extends the 'Parent::session()' and 'Root::session()'
functions with an additional 'affinity' parameter, which is inteded to
express the preferred affinity of the new session. For CPU sessions
provided by core, the values will be used to select the set of CPUs
assigned to the CPU session. For other services, the session affinity
information can be utilized to optimize the locality of the server
thread with the client. For example, to enable the IRQ session to route
an IRQ to the CPU core on which the corresponding device driver (the IRQ
client) is running.
This commit is contained in:
Norman Feske
2013-08-07 23:10:28 +02:00
parent f1af8e371d
commit 6d837c9e26
35 changed files with 137 additions and 78 deletions

View File

@ -56,7 +56,8 @@ Platform_env_base::Rm_session_mmap::_dataspace_writable(Dataspace_capability ds)
Session_capability
Platform_env::Local_parent::session(Service_name const &service_name,
Session_args const &args)
Session_args const &args,
Affinity const &affinity)
{
if (strcmp(service_name.string(),
Rm_session::service_name()) == 0)
@ -66,7 +67,7 @@ Platform_env::Local_parent::session(Service_name const &service_name,
.ulong_value(~0);
if (size == 0)
return Parent_client::session(service_name, args);
return Parent_client::session(service_name, args, affinity);
Rm_session_mmap *rm = new (env()->heap())
Rm_session_mmap(true, size);
@ -74,7 +75,7 @@ Platform_env::Local_parent::session(Service_name const &service_name,
return Session_capability::local_cap(rm);
}
return Parent_client::session(service_name, args);
return Parent_client::session(service_name, args, affinity);
}

View File

@ -387,7 +387,8 @@ namespace Genode {
**********************/
Session_capability session(Service_name const &,
Session_args const &);
Session_args const &,
Affinity const & = Affinity());
void close(Session_capability);
/**