redhawksdr

Using affinity in devices


The use of affinity to control cpu and other resources of a component appears to be a new feature in RedHawk 2.1. The manual only describes its use in Resource components but I would like to use it in a Device. I tried adding the block for cpu to the DCD for the device but it appeared to have no affect. Is there a way to control affinity for a Device in RedHawk?


Solution

  • Section 10.4 Describes how to add the affinity section to the DCD file. The same affinity directives for a Components are available for Devices and Sevices. Consult section 7.3.5 Resource Affinity for more detailed information. You can provide a cpu set using the following: <affinity> <simpleref id="affinity_class" value="cpu /> <simpleref id="affinity_value" value="1-7" /> </affinity> The value is any valid string that numa_parse_cpustring accepts.

    The caveat is the stock rpms for REDHAWK are not compiled with --enable-affinity=yes. So you will need to recompile the framework to take advantage of these options.