diff options
Diffstat (limited to 'litmus/sched_cedf.c')
-rw-r--r-- | litmus/sched_cedf.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/litmus/sched_cedf.c b/litmus/sched_cedf.c index aa350bb7eabc..e78ff0ade237 100644 --- a/litmus/sched_cedf.c +++ b/litmus/sched_cedf.c | |||
@@ -718,17 +718,29 @@ static void cedf_change_prio_pai_tasklet(struct task_struct *old_prio, | |||
718 | { | 718 | { |
719 | struct tasklet_struct* step; | 719 | struct tasklet_struct* step; |
720 | unsigned long flags; | 720 | unsigned long flags; |
721 | cedf_domain_t *cluster = task_cpu_cluster(old_prio); | 721 | cedf_domain_t *cluster; |
722 | struct task_struct *probe; | ||
723 | |||
724 | // identify the cluster by the assignment of these tasks. one should | ||
725 | // be non-NULL. | ||
726 | probe = (old_prio) ? old_prio : new_prio; | ||
727 | |||
728 | if(probe) { | ||
729 | cluster = task_cpu_cluster(probe); | ||
722 | 730 | ||
723 | if(cluster->pending_tasklets.head != NULL) { | 731 | if(cluster->pending_tasklets.head != NULL) { |
724 | raw_spin_lock_irqsave(&cluster->cluster_lock, flags); | 732 | raw_spin_lock_irqsave(&cluster->cluster_lock, flags); |
725 | for(step = cluster->pending_tasklets.head; step != NULL; step = step->next) { | 733 | for(step = cluster->pending_tasklets.head; step != NULL; step = step->next) { |
726 | if(step->owner == old_prio) { | 734 | if(step->owner == old_prio) { |
727 | TRACE("%s: Found tasklet to change: %d\n", __FUNCTION__, step->owner->pid); | 735 | TRACE("%s: Found tasklet to change: %d\n", __FUNCTION__, step->owner->pid); |
728 | step->owner = new_prio; | 736 | step->owner = new_prio; |
737 | } | ||
729 | } | 738 | } |
739 | raw_spin_unlock_irqrestore(&cluster->cluster_lock, flags); | ||
730 | } | 740 | } |
731 | raw_spin_unlock_irqrestore(&cluster->cluster_lock, flags); | 741 | } |
742 | else { | ||
743 | TRACE("%s: Both priorities were NULL\n"); | ||
732 | } | 744 | } |
733 | } | 745 | } |
734 | 746 | ||
@@ -900,7 +912,7 @@ static void cedf_task_new(struct task_struct * t, int on_rq, int running) | |||
900 | cpu_entry_t* entry; | 912 | cpu_entry_t* entry; |
901 | cedf_domain_t* cluster; | 913 | cedf_domain_t* cluster; |
902 | 914 | ||
903 | TRACE("gsn edf: task new %d\n", t->pid); | 915 | TRACE("c-edf: task new %d\n", t->pid); |
904 | 916 | ||
905 | /* the cluster doesn't change even if t is running */ | 917 | /* the cluster doesn't change even if t is running */ |
906 | cluster = task_cpu_cluster(t); | 918 | cluster = task_cpu_cluster(t); |
@@ -1467,7 +1479,6 @@ static long cedf_allocate_lock(struct litmus_lock **lock, int type, | |||
1467 | { | 1479 | { |
1468 | int err; | 1480 | int err; |
1469 | 1481 | ||
1470 | /* GSN-EDF currently only supports the FMLP for global resources. */ | ||
1471 | switch (type) { | 1482 | switch (type) { |
1472 | #ifdef CONFIG_LITMUS_NESTED_LOCKING | 1483 | #ifdef CONFIG_LITMUS_NESTED_LOCKING |
1473 | case RSM_MUTEX: | 1484 | case RSM_MUTEX: |
@@ -1518,7 +1529,6 @@ static long cedf_allocate_affinity_observer(struct affinity_observer **aff_obs, | |||
1518 | { | 1529 | { |
1519 | int err; | 1530 | int err; |
1520 | 1531 | ||
1521 | /* GSN-EDF currently only supports the FMLP for global resources. */ | ||
1522 | switch (type) { | 1532 | switch (type) { |
1523 | 1533 | ||
1524 | case KFMLP_SIMPLE_GPU_AFF_OBS: | 1534 | case KFMLP_SIMPLE_GPU_AFF_OBS: |