diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-06-08 17:15:48 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-06-08 17:15:48 -0400 |
commit | 3088111567f334cccff1123f9bd97f2ba52af944 (patch) | |
tree | d3ecda396dfc7d528056161ef2fdd01cdb2ba2fa | |
parent | 244d30476a6fa49d67c13ecf3751d2fa33785b4a (diff) |
GSN-EDF: fix admission of suspended tasks
In the task_new() handler, don't process a job arrival event if the
task is actually suspended. This fixes the admission of suspended
tasks.
-rw-r--r-- | litmus/sched_gsn_edf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c index 04454e8ce51e..27a89eeb11ac 100644 --- a/litmus/sched_gsn_edf.c +++ b/litmus/sched_gsn_edf.c | |||
@@ -531,7 +531,7 @@ static void gsnedf_finish_switch(struct task_struct *prev) | |||
531 | 531 | ||
532 | /* Prepare a task for running in RT mode | 532 | /* Prepare a task for running in RT mode |
533 | */ | 533 | */ |
534 | static void gsnedf_task_new(struct task_struct * t, int on_rq, int running) | 534 | static void gsnedf_task_new(struct task_struct * t, int on_rq, int is_scheduled) |
535 | { | 535 | { |
536 | unsigned long flags; | 536 | unsigned long flags; |
537 | cpu_entry_t* entry; | 537 | cpu_entry_t* entry; |
@@ -543,7 +543,7 @@ static void gsnedf_task_new(struct task_struct * t, int on_rq, int running) | |||
543 | /* setup job params */ | 543 | /* setup job params */ |
544 | release_at(t, litmus_clock()); | 544 | release_at(t, litmus_clock()); |
545 | 545 | ||
546 | if (running) { | 546 | if (is_scheduled) { |
547 | entry = &per_cpu(gsnedf_cpu_entries, task_cpu(t)); | 547 | entry = &per_cpu(gsnedf_cpu_entries, task_cpu(t)); |
548 | BUG_ON(entry->scheduled); | 548 | BUG_ON(entry->scheduled); |
549 | 549 | ||
@@ -564,7 +564,8 @@ static void gsnedf_task_new(struct task_struct * t, int on_rq, int running) | |||
564 | } | 564 | } |
565 | t->rt_param.linked_on = NO_CPU; | 565 | t->rt_param.linked_on = NO_CPU; |
566 | 566 | ||
567 | gsnedf_job_arrival(t); | 567 | if (is_running(t)) |
568 | gsnedf_job_arrival(t); | ||
568 | raw_spin_unlock_irqrestore(&gsnedf_lock, flags); | 569 | raw_spin_unlock_irqrestore(&gsnedf_lock, flags); |
569 | } | 570 | } |
570 | 571 | ||