From 24641baa5245f9248c1d972e605238d44f7254f4 Mon Sep 17 00:00:00 2001 From: Daniel Hellstrom Date: Mon, 23 Jun 2014 15:10:34 +0200 Subject: NFS RPCd task affinity config option Similar to the task priority option the new CPU Affinity option is fist controlled by the RPCI specific rpciodCpuset option and then the global network task config and then falls back to not setting the affinity (all CPUs) --- cpukit/libfs/src/nfsclient/src/rpcio.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cpukit/libfs/src/nfsclient/src/rpcio.c b/cpukit/libfs/src/nfsclient/src/rpcio.c index 7324e02fd9..aeeb275b69 100644 --- a/cpukit/libfs/src/nfsclient/src/rpcio.c +++ b/cpukit/libfs/src/nfsclient/src/rpcio.c @@ -84,6 +84,9 @@ #include #include #include +#ifdef RTEMS_SMP +#include +#endif #include "rpcio.h" @@ -407,6 +410,7 @@ static rtems_interval ticksPerSec; /* cached system clock rate (WHO IS ASSUMED */ rtems_task_priority rpciodPriority = 0; +cpu_set_t rpciodCpuset; #if (DEBUG) & DEBUG_MALLOC /* malloc wrappers for debugging */ @@ -983,6 +987,13 @@ struct sockwakeup wkup; &rpciod); assert( status == RTEMS_SUCCESSFUL ); +#ifdef RTEMS_SMP + if (CPU_EMPTY(&rpciodCpuset)) + CPU_COPY(&rpciodCpuset, &rtems_bsdnet_config.network_task_cpuset); + if (!CPU_EMPTY(&rpciodCpuset)) + rtems_task_set_affinity(rpciod, sizeof(cpu_set_t), &rpciodCpuset); +#endif + wkup.sw_pfn = rxWakeupCB; wkup.sw_arg = &rpciod; assert( 0==setsockopt(ourSock, SOL_SOCKET, SO_RCVWAKEUP, &wkup, sizeof(wkup)) ); -- cgit v1.2.3