From fccce270a5540021b544d439595fa0a736242ff0 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Sun, 9 Dec 2012 16:34:36 -0500 Subject: Specify aux thread granularity in jiffies --- litmus/aux_tasks.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/litmus/aux_tasks.c b/litmus/aux_tasks.c index e5f3c82d32e9..20f477f6e3bc 100755 --- a/litmus/aux_tasks.c +++ b/litmus/aux_tasks.c @@ -6,12 +6,16 @@ #include #include +#include + +#define AUX_SLICE_NR_JIFFIES 1 +#define AUX_SLICE_NS ((NSEC_PER_SEC / HZ) * AUX_SLICE_NR_JIFFIES) + static int admit_aux_task(struct task_struct *t) { int retval = 0; struct task_struct *leader = t->group_leader; - /* budget enforcement increments job numbers. job numbers are used in * tie-breaking of aux_tasks. method helps ensure: * 1) aux threads with no inherited priority can starve another (they share @@ -23,9 +27,9 @@ static int admit_aux_task(struct task_struct *t) * fail-safe. */ struct rt_task tp = { - .period = 1000000, /* 1ms */ - .relative_deadline = 1000000, - .exec_cost = 1000000, /* allow full utilization with buget tracking */ + .period = AUX_SLICE_NS, + .relative_deadline = AUX_SLICE_NS, + .exec_cost = AUX_SLICE_NS, /* allow full utilization with buget tracking */ .phase = 0, .cpu = task_cpu(leader), /* take CPU of group leader */ .budget_policy = QUANTUM_ENFORCEMENT, -- cgit v1.2.2