aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_crm.c
diff options
context:
space:
mode:
Diffstat (limited to 'litmus/sched_crm.c')
-rw-r--r--litmus/sched_crm.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/litmus/sched_crm.c b/litmus/sched_crm.c
index b3f98f17ac0b..a60f819138d8 100644
--- a/litmus/sched_crm.c
+++ b/litmus/sched_crm.c
@@ -780,7 +780,7 @@ static enum hrtimer_restart crm_simple_io_on_exhausted(struct task_struct *t, in
780 else { 780 else {
781 lt_t remaining; 781 lt_t remaining;
782 crm_domain_t *cluster; 782 crm_domain_t *cluster;
783 unsigned long flags; 783 unsigned long flags, kludge_flags;
784 784
785 BUG_ON(in_schedule); 785 BUG_ON(in_schedule);
786 786
@@ -793,6 +793,8 @@ static enum hrtimer_restart crm_simple_io_on_exhausted(struct task_struct *t, in
793 /* force job completion */ 793 /* force job completion */
794 TRACE_TASK(t, "blocked, postponing deadline\n"); 794 TRACE_TASK(t, "blocked, postponing deadline\n");
795 795
796 local_irq_save(kludge_flags);
797
796 /* Outermost lock of the cluster. Recursive lock calls are 798 /* Outermost lock of the cluster. Recursive lock calls are
797 * possible on this code path. This should be the _ONLY_ 799 * possible on this code path. This should be the _ONLY_
798 * scenario where recursive calls are made. */ 800 * scenario where recursive calls are made. */
@@ -867,6 +869,8 @@ static enum hrtimer_restart crm_simple_io_on_exhausted(struct task_struct *t, in
867#else 869#else
868 raw_readyq_unlock_irqrestore(&cluster->cluster_lock, flags); 870 raw_readyq_unlock_irqrestore(&cluster->cluster_lock, flags);
869#endif 871#endif
872 flush_pending_wakes();
873 local_irq_restore(kludge_flags);
870 874
871 /* we need to set up the budget timer since we're within the callback. */ 875 /* we need to set up the budget timer since we're within the callback. */
872 hrtimer_forward_now(&get_budget_timer(t).timer.timer, 876 hrtimer_forward_now(&get_budget_timer(t).timer.timer,
@@ -972,7 +976,7 @@ static enum hrtimer_restart crm_sobliv_on_exhausted(struct task_struct *t, int i
972 else { 976 else {
973 lt_t remaining; 977 lt_t remaining;
974 crm_domain_t *cluster; 978 crm_domain_t *cluster;
975 unsigned long flags; 979 unsigned long flags, kludge_flags;
976 980
977 BUG_ON(in_schedule); 981 BUG_ON(in_schedule);
978 982
@@ -988,6 +992,7 @@ static enum hrtimer_restart crm_sobliv_on_exhausted(struct task_struct *t, int i
988 /* Outermost lock of the cluster. Recursive lock calls are 992 /* Outermost lock of the cluster. Recursive lock calls are
989 * possible on this code path. This should be the _ONLY_ 993 * possible on this code path. This should be the _ONLY_
990 * scenario where recursive calls are made. */ 994 * scenario where recursive calls are made. */
995 local_irq_save(kludge_flags);
991#ifdef CONFIG_LITMUS_DGL_SUPPORT 996#ifdef CONFIG_LITMUS_DGL_SUPPORT
992 /* Unfortunately, we _might_ need to grab the DGL lock, so we 997 /* Unfortunately, we _might_ need to grab the DGL lock, so we
993 * must grab it every time since it must be take before the 998 * must grab it every time since it must be take before the
@@ -1062,6 +1067,8 @@ static enum hrtimer_restart crm_sobliv_on_exhausted(struct task_struct *t, int i
1062#else 1067#else
1063 raw_readyq_unlock_irqrestore(&cluster->cluster_lock, flags); 1068 raw_readyq_unlock_irqrestore(&cluster->cluster_lock, flags);
1064#endif 1069#endif
1070 flush_pending_wakes();
1071 local_irq_restore(kludge_flags);
1065 1072
1066 /* we need to set up the budget timer since we're within the callback. */ 1073 /* we need to set up the budget timer since we're within the callback. */
1067 if (bt_flag_is_set(t, BTF_IS_TOP_M)) { 1074 if (bt_flag_is_set(t, BTF_IS_TOP_M)) {
@@ -2677,6 +2684,7 @@ static long crm_activate_plugin(void)
2677 2684
2678 /* de-allocate old clusters, if any */ 2685 /* de-allocate old clusters, if any */
2679 cleanup_crm(); 2686 cleanup_crm();
2687
2680 2688
2681 printk(KERN_INFO "C-RM: Activate Plugin, cluster configuration = %d\n", 2689 printk(KERN_INFO "C-RM: Activate Plugin, cluster configuration = %d\n",
2682 cluster_config); 2690 cluster_config);
@@ -2818,6 +2826,8 @@ static long crm_activate_plugin(void)
2818 init_nvidia_info(); 2826 init_nvidia_info();
2819#endif 2827#endif
2820 2828
2829 init_wake_queues();
2830
2821 free_cpumask_var(mask); 2831 free_cpumask_var(mask);
2822 clusters_allocated = 1; 2832 clusters_allocated = 1;
2823 return 0; 2833 return 0;