aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/litmus/rt_param.h1
-rw-r--r--litmus/ikglp_lock.c2
-rw-r--r--litmus/sched_cedf.c28
3 files changed, 17 insertions, 14 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index 49b2b45396e4..144be3b6ee3d 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -355,6 +355,7 @@ struct rt_param {
355 355
356#ifdef CONFIG_REALTIME_AUX_TASKS 356#ifdef CONFIG_REALTIME_AUX_TASKS
357 unsigned int is_aux_task:1; 357 unsigned int is_aux_task:1;
358 unsigned int aux_ready:1;
358 unsigned int has_aux_tasks:1; 359 unsigned int has_aux_tasks:1;
359 unsigned int hide_from_aux_tasks:1; 360 unsigned int hide_from_aux_tasks:1;
360 361
diff --git a/litmus/ikglp_lock.c b/litmus/ikglp_lock.c
index e78a4ec0dff6..57be5db5f1be 100644
--- a/litmus/ikglp_lock.c
+++ b/litmus/ikglp_lock.c
@@ -1771,6 +1771,8 @@ struct litmus_lock* ikglp_new(int m,
1771 int nr_replicas = 0; 1771 int nr_replicas = 0;
1772 int i; 1772 int i;
1773 1773
1774 BUG_ON(m <= 0);
1775
1774 if(!access_ok(VERIFY_READ, arg, sizeof(nr_replicas))) 1776 if(!access_ok(VERIFY_READ, arg, sizeof(nr_replicas)))
1775 { 1777 {
1776 return(NULL); 1778 return(NULL);
diff --git a/litmus/sched_cedf.c b/litmus/sched_cedf.c
index 9d4e822aeede..508a0596f9a7 100644
--- a/litmus/sched_cedf.c
+++ b/litmus/sched_cedf.c
@@ -316,10 +316,10 @@ static noinline void requeue(struct task_struct* task)
316 316
317 if (is_released(task, litmus_clock())) 317 if (is_released(task, litmus_clock()))
318#ifdef CONFIG_REALTIME_AUX_TASKS 318#ifdef CONFIG_REALTIME_AUX_TASKS
319 if (unlikely(tsk_rt(task)->is_aux_task && task->state != TASK_RUNNING)) { 319 if (unlikely(tsk_rt(task)->is_aux_task && task->state != TASK_RUNNING && !tsk_rt(task)->aux_ready)) {
320 /* aux_task probably transitioned to real-time while it was blocked */ 320 /* aux_task probably transitioned to real-time while it was blocked */
321 TRACE_CUR("aux task %s/%d is not ready!\n", task->comm, task->pid); 321 TRACE_CUR("aux task %s/%d is not ready!\n", task->comm, task->pid);
322 unlink(task); /* really needed? */ 322 tsk_rt(task)->aux_ready = 1; /* allow this to only happen once per aux task */
323 } 323 }
324 else 324 else
325#endif 325#endif
@@ -419,16 +419,6 @@ static noinline void job_completion(struct task_struct *t, int forced)
419 419
420#ifdef CONFIG_LITMUS_LOCKING 420#ifdef CONFIG_LITMUS_LOCKING
421 BUG_ON(!is_persistent(t) && tsk_rt(t)->inh_task); 421 BUG_ON(!is_persistent(t) && tsk_rt(t)->inh_task);
422#if 0
423 if (!is_persistent(t) && tsk_rt(t)->inh_task) {
424 /* job completing while inheriting a priority */
425 TRACE_TASK(t,
426 "WARNING: Completing job while still inheriting a "
427 "priority (%s/%d)!\n",
428 tsk_rt(t)->inh_task->comm,
429 tsk_rt(t)->inh_task->pid);
430 }
431#endif
432#endif 422#endif
433 423
434 /* set flags */ 424 /* set flags */
@@ -1572,7 +1562,7 @@ static struct litmus_lock_ops cedf_ikglp_lock_ops = {
1572static struct litmus_lock* cedf_new_ikglp(void* __user arg) 1562static struct litmus_lock* cedf_new_ikglp(void* __user arg)
1573{ 1563{
1574 // assumes clusters of uniform size. 1564 // assumes clusters of uniform size.
1575 return ikglp_new(cluster_size/num_clusters, &cedf_ikglp_lock_ops, arg); 1565 return ikglp_new(cluster_size, &cedf_ikglp_lock_ops, arg);
1576} 1566}
1577 1567
1578#endif /* CONFIG_LITMUS_NESTED_LOCKING */ 1568#endif /* CONFIG_LITMUS_NESTED_LOCKING */
@@ -1728,8 +1718,18 @@ static void cleanup_cedf(void)
1728#if defined(CONFIG_LITMUS_NVIDIA) && defined(CONFIG_LITMUS_SOFTIRQD) 1718#if defined(CONFIG_LITMUS_NVIDIA) && defined(CONFIG_LITMUS_SOFTIRQD)
1729static int cedf_map_gpu_to_cpu(int gpu) 1719static int cedf_map_gpu_to_cpu(int gpu)
1730{ 1720{
1721 int default_cpu;
1731 int cpu_cluster = gpu / gpu_cluster_size; 1722 int cpu_cluster = gpu / gpu_cluster_size;
1732 int default_cpu = cedf[cpu_cluster].cpus[0]->cpu; // first CPU in given cluster 1723
1724 /* bonham-specific hack for the fully partitioned case (both CPUs and GPUs partitioned) */
1725 /* TODO: Make this aware of the NUMA topology generically */
1726 if(num_clusters == 12 && num_gpu_clusters == 8) {
1727 if(gpu >= 4) {
1728 cpu_cluster += 2; // assign the GPU to a CPU on the same NUMA node
1729 }
1730 }
1731
1732 default_cpu = cedf[cpu_cluster].cpus[0]->cpu; // first CPU in given cluster
1733 1733
1734 TRACE("CPU %d is default for GPU %d interrupt threads.\n", default_cpu, gpu); 1734 TRACE("CPU %d is default for GPU %d interrupt threads.\n", default_cpu, gpu);
1735 1735