This patch fixes some problem with affinity work and modify the
configuration file format.
For example, the detect cup set can be formatted as follow:
- detect_cpu_set:
cpu: [ "all" ]
mode: "exclusive" # run detect threads in these cpus
prio:
low: [ 0 ] # threads on CPU 0 have low prio
medium: [ "1-2" ] # threads on CPU 1 and 2 have medium prio
high: [ 3 ] # threads on CPU 3 have high prio
default: "medium" #default priority is "medium"
This patch adds a new parameter the affinity. The 'threads' keyword
is used to set the number of threads to start for a family. It can
only be used on family where multiple thread are laucnh in the running
mode. This is mainly the case of the detect threads.
Signed-off-by: Eric Leblond <eric@regit.org>
This patch updates affinity setting to add a support for per cpu
priority setting. In exclusive mode a thread is dedicated to a CPU.
This patch adds the ability to set the thread prio for all threads
of a family running on a given CPU.
With this patch we can write
- detect_cpu_set:
cpu: [ "all" ]
mode: "exclusive" # run detect threads in these cpus
low_prio: [ 0 ]
medium_prio: [ "1-2" ]
high_prio: [ 3 ]
With this configuration, detect threads assigned to cpu 0 will
have a low priority. Detect threads on cpus 1 and 2 will have
prio medium...
The previous configuration is equivalent to:
- detect_cpu_set:
cpu: [ "all" ]
mode: "exclusive" # run detect threads in these cpus
low_prio: [ 0 ]
high_prio: [ 3 ]
prio: "medium"
because the prio value is used a default.
Signed-off-by: Eric Leblond <eric@regit.org>
This patch implement the setting of each management threads in
the corresponding thread affinity. This is done by modifiying
thread creation function.
Signed-off-by: Eric Leblond <eric@regit.org>