aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-04-25 19:30:48 -0400
committerGlenn Elliott <gelliott@cs.unc.edu>2012-04-25 19:30:48 -0400
commit040301747953ae9a2017def70e6004affe1e9aeb (patch)
tree2746125dfb9275cda2814a55ae4235052c2dd6cc
parent58f04ff13ac7128609ee468eb317c71817474a84 (diff)
Fix/test C-EDF for GPU RTSS12.
-rw-r--r--litmus/sched_cedf.c32
-rw-r--r--litmus/sched_gsn_edf.c2
2 files changed, 21 insertions, 13 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:
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c
index 16f532d690cb..8c48757fa86c 100644
--- a/litmus/sched_gsn_edf.c
+++ b/litmus/sched_gsn_edf.c
@@ -1654,7 +1654,6 @@ static long gsnedf_allocate_lock(struct litmus_lock **lock, int type,
1654{ 1654{
1655 int err; 1655 int err;
1656 1656
1657 /* GSN-EDF currently only supports the FMLP for global resources. */
1658 switch (type) { 1657 switch (type) {
1659 1658
1660 case FMLP_SEM: 1659 case FMLP_SEM:
@@ -1713,7 +1712,6 @@ static long gsnedf_allocate_affinity_observer(
1713{ 1712{
1714 int err; 1713 int err;
1715 1714
1716 /* GSN-EDF currently only supports the FMLP for global resources. */
1717 switch (type) { 1715 switch (type) {
1718 1716
1719 case KFMLP_SIMPLE_GPU_AFF_OBS: 1717 case KFMLP_SIMPLE_GPU_AFF_OBS: