Handle management thread with corresponding affinity

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>
remotes/origin/master-1.1.x
Eric Leblond 15 years ago committed by Victor Julien
parent 0809deafc4
commit ea566d6601

@ -968,6 +968,8 @@ ThreadVars *TmThreadCreateMgmtThread(char *name, void *(fn_p)(void *),
tv = TmThreadCreate(name, NULL, NULL, NULL, NULL, "custom", fn_p, mucond);
TmThreadSetCPU(tv, MANAGEMENT_CPU_SET);
if (tv != NULL)
tv->type = TVT_MGMT;

@ -74,6 +74,13 @@ ThreadsAffinityType thread_affinity[MAX_CPU_SET] = {
.prio = PRIO_MEDIUM,
.lcpu = 0,
},
{
.name = "management_cpu_set",
.mode_flag = BALANCED_AFFINITY,
.prio = PRIO_MEDIUM,
.lcpu = 0,
},
};
/**

@ -33,6 +33,7 @@ enum {
VERDICT_CPU_SET,
REJECT_CPU_SET,
OUTPUT_CPU_SET,
MANAGEMENT_CPU_SET,
MAX_CPU_SET
};

Loading…
Cancel
Save