RPC threads on specific cores

Norman Feske norman.feske at ...1...
Wed Jul 3 17:51:45 CEST 2013


Hi Daniel,

> Is there a way to have RPC server threads launch on specific cores (as
> opposed to the default of core 0)?

that is not supported out of the box. Here is what I'd recommend as an
interim solution until the API supports this feature:

It is possible to set the affinity of given thread using the
'Cpu_session::affinity()' function, which takes a 'Thread_capability' as
argument. Because an 'Rpc_entrypoint' is actually a thread (it is
derived from 'Thread_base'), the only thing needed to set the affinity
for an entrypoint is a way to obtain its 'Thread_capability'. The
simplest way to achieve that would be adding an accessor function to the
'Rpc_entrypoint' (see 'base/include/base/rpc_server.h'). The accessor
function would just return the capability as returned from
'Thread_base::cap()'. This capability could then be passed as argument
to 'env()->cpu_session()->affinity()'.

Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list