Changeset e4d8513 in rtems


Ignore:
Timestamp:
Nov 14, 2014, 7:58:00 AM (5 years ago)
Author:
Daniel Cederman <cederman@…>
Branches:
4.11, master
Children:
9e8d8b5c
Parents:
69e3f27
git-author:
Daniel Cederman <cederman@…> (11/14/14 07:58:00)
git-committer:
Daniel Hellstrom <daniel@…> (12/02/14 12:41:20)
Message:

nfs: Add RPCd task affinity config option

Similar to the task priority option, the new CPU affinity
option is first controlled by the RPCI specific rpciodCpuset
option. If that is not set, it uses the global network task config.
If that is also not set, it falls back to not setting the affinity
at all, using all CPUs.

Location:
cpukit/libfs/src/nfsclient/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/nfsclient/src/librtemsNfs.h

    r69e3f27 re4d8513  
    9999extern rtems_task_priority rpciodPriority;
    100100
     101#ifdef RTEMS_SMP
     102/** CPU affinity of daemon; may be setup prior to calling rpcUdpInit();
     103 * otherwise the network task CPU affinity from the rtems_bsdnet_config
     104 * is used...
     105 */
     106extern const cpu_set_t *rpciodCpuset;
     107extern size_t rpciodCpusetSize;
     108#endif
     109
    101110/**
    102111 * @brief Sets the XIDs of the RPC transaction hash table.
  • cpukit/libfs/src/nfsclient/src/rpcio.c

    r69e3f27 re4d8513  
    8585#include <netinet/in.h>
    8686#include <arpa/inet.h>
     87#include <sys/cpuset.h>
    8788
    8889#include "rpcio.h"
     
    408409
    409410rtems_task_priority             rpciodPriority = 0;
     411#ifdef RTEMS_SMP
     412const cpu_set_t                 *rpciodCpuset = 0;
     413size_t                          rpciodCpusetSize = 0;
     414#endif
    410415
    411416#if (DEBUG) & DEBUG_MALLOC
     
    983988                                                                                        &rpciod);
    984989                        assert( status == RTEMS_SUCCESSFUL );
     990
     991#ifdef RTEMS_SMP
     992                        if ( rpciodCpuset == 0 ) {
     993                                rpciodCpuset = rtems_bsdnet_config.network_task_cpuset;
     994                                rpciodCpusetSize = rtems_bsdnet_config.network_task_cpuset_size;
     995                        }
     996                        if ( rpciodCpuset != 0 )
     997                                rtems_task_set_affinity( rpciod, rpciodCpusetSize, rpciodCpuset );
     998#endif
    985999
    9861000                        wkup.sw_pfn = rxWakeupCB;
Note: See TracChangeset for help on using the changeset viewer.