Hi, Is there a way to have RPC server threads launch on specific cores (as opposed to the default of core 0)?
Daniel
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