diff options
author | Jeremy Erickson <jerickso@cs.unc.edu> | 2013-01-28 13:15:36 -0500 |
---|---|---|
committer | Jeremy Erickson <jerickso@cs.unc.edu> | 2013-01-28 13:15:36 -0500 |
commit | 91c2ff8348661f88638e286f0c1334c3afe00f33 (patch) | |
tree | 4f7efcf2fce3c7170473abfa0bcea9facea7cd15 | |
parent | 28cc6b58a273c82135e467d6897033289ef9fcd3 (diff) |
Fixes for C-FL-split
-rwxr-xr-x | litmus/sanitizecfl.pl | 12 | ||||
-rw-r--r-- | litmus/sched_cfl_split.c | 10 |
2 files changed, 17 insertions, 5 deletions
diff --git a/litmus/sanitizecfl.pl b/litmus/sanitizecfl.pl new file mode 100755 index 000000000000..9b773878dca4 --- /dev/null +++ b/litmus/sanitizecfl.pl | |||
@@ -0,0 +1,12 @@ | |||
1 | #!/usr/bin/perl | ||
2 | # A quick hack to allow diff to work between sched_gsn_edf.c and | ||
3 | # sched_cfl_split.c | ||
4 | open INFILE, "<sched_cedf.c"; | ||
5 | open OUTFILE, ">sched_cedf_namechange.c"; | ||
6 | while (my $line = <INFILE>){ | ||
7 | $line =~ s/cedf/cflsplit/g; | ||
8 | $line =~ s/C-EDF/C-FL-split/g; | ||
9 | print OUTFILE $line; | ||
10 | } | ||
11 | close INFILE; | ||
12 | close OUTFILE; | ||
diff --git a/litmus/sched_cfl_split.c b/litmus/sched_cfl_split.c index 6783b4c94366..ea5842c806e8 100644 --- a/litmus/sched_cfl_split.c +++ b/litmus/sched_cfl_split.c | |||
@@ -425,11 +425,11 @@ static void check_for_preemptions(cflsplit_domain_t *cluster) | |||
425 | &per_cpu(cflsplit_cpu_entries, task_cpu(task))); | 425 | &per_cpu(cflsplit_cpu_entries, task_cpu(task))); |
426 | if(affinity) | 426 | if(affinity) |
427 | last = affinity; | 427 | last = affinity; |
428 | else if(last->linked) | 428 | else if(requeue_preempted_job(last->linked)) |
429 | requeue(last->linked); | 429 | requeue(last->linked); |
430 | } | 430 | } |
431 | #else | 431 | #else |
432 | if (last->linked) | 432 | if (requeue_preempted_job(last->linked)) |
433 | requeue(last->linked); | 433 | requeue(last->linked); |
434 | #endif | 434 | #endif |
435 | link_task_to_cpu(task, last); | 435 | link_task_to_cpu(task, last); |
@@ -611,7 +611,7 @@ static struct task_struct* cflsplit_schedule(struct task_struct * prev) | |||
611 | request_exit_np(entry->scheduled); | 611 | request_exit_np(entry->scheduled); |
612 | } | 612 | } |
613 | else if (np && needs_move) { | 613 | else if (np && needs_move) { |
614 | move_deadline(entry->scheduled); | 614 | request_exit_np(entry->scheduled); |
615 | } | 615 | } |
616 | 616 | ||
617 | /* Any task that is preemptable and either exhausts its execution | 617 | /* Any task that is preemptable and either exhausts its execution |
@@ -619,9 +619,9 @@ static struct task_struct* cflsplit_schedule(struct task_struct * prev) | |||
619 | * this. Don't do a job completion if we block (can't have timers running | 619 | * this. Don't do a job completion if we block (can't have timers running |
620 | * for blocked jobs). Preemption go first for the same reason. | 620 | * for blocked jobs). Preemption go first for the same reason. |
621 | */ | 621 | */ |
622 | if (!np && (out_of_time || sleep) && !blocks && !preempt) | 622 | if (!np && (out_of_time || sleep) && !blocks) |
623 | job_completion(entry->scheduled, !sleep); | 623 | job_completion(entry->scheduled, !sleep); |
624 | else if (!np && needs_move && !blocks && !preempt) { | 624 | else if (!np && needs_move && !blocks) { |
625 | move_deadline(entry->scheduled); | 625 | move_deadline(entry->scheduled); |
626 | } | 626 | } |
627 | 627 | ||