aboutsummaryrefslogtreecommitdiffstats
path: root/litmus
diff options
context:
space:
mode:
Diffstat (limited to 'litmus')
-rw-r--r--litmus/sched_edf_os.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/litmus/sched_edf_os.c b/litmus/sched_edf_os.c
index 1c633b591412..ba049adc8154 100644
--- a/litmus/sched_edf_os.c
+++ b/litmus/sched_edf_os.c
@@ -40,8 +40,8 @@ DEFINE_PER_CPU(edfos_domain_t, edfos_domains);
40#define wrong_cpu(t) is_migrat_task((t)) \ 40#define wrong_cpu(t) is_migrat_task((t)) \
41 && task_cpu((t)) != get_partition((t)) 41 && task_cpu((t)) != get_partition((t))
42/* Manipulate share for current cpu */ 42/* Manipulate share for current cpu */
43#define cur_cpu_fract_num(t) edfos_params(t).fraction[0][get_partition(t)] 43#define cur_cpu_fract_num(t) edfos_params(t).fraction[get_partition(t)][0]
44#define cur_cpu_fract_den(t) edfos_params(t).fraction[1][get_partition(t)] 44#define cur_cpu_fract_den(t) edfos_params(t).fraction[get_partition(t)][1]
45/* Get job number for current cpu */ 45/* Get job number for current cpu */
46#define cur_cpu_job_no(t) \ 46#define cur_cpu_job_no(t) \
47 tsk_rt(t)->semi_part.cpu_job_no[get_partition(t)] 47 tsk_rt(t)->semi_part.cpu_job_no[get_partition(t)]
@@ -293,8 +293,8 @@ static int next_cpu_for_job(struct task_struct *t)
293 &edfos_params(t).release_queue); 293 &edfos_params(t).release_queue);
294 cpu = ((int*)node->value) - edfos_params(t).heap_data; 294 cpu = ((int*)node->value) - edfos_params(t).heap_data;
295 *((int*)node->value) = compute_pfair_deadline( 295 *((int*)node->value) = compute_pfair_deadline(
296 edfos_params(t).fraction[0][cpu], 296 edfos_params(t).fraction[cpu][0],
297 edfos_params(t).fraction[1][cpu], 297 edfos_params(t).fraction[cpu][1],
298 tsk_rt(t)->semi_part.cpu_job_no[cpu] + 1); 298 tsk_rt(t)->semi_part.cpu_job_no[cpu] + 1);
299 bheap_insert(fakepfair_ready_order, 299 bheap_insert(fakepfair_ready_order,
300 &edfos_params(t).ready_queue, node); 300 &edfos_params(t).ready_queue, node);
@@ -307,16 +307,16 @@ static int next_cpu_for_job(struct task_struct *t)
307 &edfos_params(t).ready_queue); 307 &edfos_params(t).ready_queue);
308 cpu = ((int*)node->value) - edfos_params(t).heap_data; 308 cpu = ((int*)node->value) - edfos_params(t).heap_data;
309 309
310 next_rel = compute_pfair_release(edfos_params(t).fraction[0][cpu], 310 next_rel = compute_pfair_release(edfos_params(t).fraction[cpu][0],
311 edfos_params(t).fraction[1][cpu], 311 edfos_params(t).fraction[cpu][1],
312 tsk_rt(t)->semi_part.cpu_job_no[cpu] 312 tsk_rt(t)->semi_part.cpu_job_no[cpu]
313 + 1); 313 + 1);
314 if (next_rel <= tsk_rt(t)->job_params.job_no) 314 if (next_rel <= tsk_rt(t)->job_params.job_no)
315 { 315 {
316 /* Next subtask already released. */ 316 /* Next subtask already released. */
317 (*(int*)node->value) = compute_pfair_deadline( 317 (*(int*)node->value) = compute_pfair_deadline(
318 edfos_params(t).fraction[0][cpu], 318 edfos_params(t).fraction[cpu][0],
319 edfos_params(t).fraction[1][cpu], 319 edfos_params(t).fraction[cpu][1],
320 tsk_rt(t)->semi_part.cpu_job_no[cpu] + 320 tsk_rt(t)->semi_part.cpu_job_no[cpu] +
321 1); 321 1);
322 bheap_insert(fakepfair_ready_order, 322 bheap_insert(fakepfair_ready_order,
@@ -485,11 +485,11 @@ static void edfos_task_new(struct task_struct * t, int on_rq, int running)
485 485
486 for (i = 0; i < NR_CPUS; i++) 486 for (i = 0; i < NR_CPUS; i++)
487 { 487 {
488 if (edfos_params(t).fraction[0][i] > 0) 488 if (edfos_params(t).fraction[i][0] > 0)
489 { 489 {
490 edfos_params(t).heap_data[i] = compute_pfair_deadline( 490 edfos_params(t).heap_data[i] = compute_pfair_deadline(
491 edfos_params(t).fraction[0][i], 491 edfos_params(t).fraction[i][0],
492 edfos_params(t).fraction[1][i], 0); 492 edfos_params(t).fraction[i][1], 0);
493 bheap_add(fakepfair_ready_order, 493 bheap_add(fakepfair_ready_order,
494 &edfos_params(t).ready_queue, 494 &edfos_params(t).ready_queue,
495 &edfos_params(t).heap_data[i], GFP_ATOMIC); 495 &edfos_params(t).heap_data[i], GFP_ATOMIC);