From a463f9a9e04385f0729f7435a0a6dff7d89b25de Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Sat, 26 May 2012 17:29:58 -0400 Subject: GPUSync patch for Litmus 2012.1. --- include/litmus/rt_param.h | 100 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 1 deletion(-) (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index d6d799174160..0198884eab86 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -5,6 +5,8 @@ #ifndef _LINUX_RT_PARAM_H_ #define _LINUX_RT_PARAM_H_ +#include + /* Litmus time type. */ typedef unsigned long long lt_t; @@ -24,6 +26,7 @@ static inline int lt_after_eq(lt_t a, lt_t b) typedef enum { RT_CLASS_HARD, RT_CLASS_SOFT, + RT_CLASS_SOFT_W_SLIP, RT_CLASS_BEST_EFFORT } task_class_t; @@ -52,6 +55,19 @@ union np_flag { } np; }; +struct affinity_observer_args +{ + int lock_od; +}; + +struct gpu_affinity_observer_args +{ + struct affinity_observer_args obs; + int replica_to_gpu_offset; + int nr_simult_users; + int relaxed_rules; +}; + /* The definition of the data that is shared between the kernel and real-time * tasks via a shared page (see litmus/ctrldev.c). * @@ -75,6 +91,9 @@ struct control_page { /* don't export internal data structures to user space (liblitmus) */ #ifdef __KERNEL__ +#include +#include + struct _rt_domain; struct bheap_node; struct release_heap; @@ -100,6 +119,31 @@ struct rt_job { struct pfair_param; +enum klitirqd_sem_status +{ + NEED_TO_REACQUIRE, + REACQUIRING, + NOT_HELD, + HELD +}; + +typedef enum gpu_migration_dist +{ + // TODO: Make this variable against NR_NVIDIA_GPUS + MIG_LOCAL = 0, + MIG_NEAR = 1, + MIG_MED = 2, + MIG_FAR = 3, // 8 GPUs in a binary tree hierarchy + MIG_NONE = 4, + + MIG_LAST = MIG_NONE +} gpu_migration_dist_t; + +typedef struct feedback_est{ + fp_t est; + fp_t accum_err; +} feedback_est_t; + /* RT task parameters for scheduling extensions * These parameters are inherited during clone and therefore must * be explicitly set up before the task set is launched. @@ -114,6 +158,52 @@ struct rt_param { /* is the task present? (true if it can be scheduled) */ unsigned int present:1; +#ifdef CONFIG_LITMUS_SOFTIRQD + /* proxy threads have minimum priority by default */ + unsigned int is_proxy_thread:1; + + /* pointer to klitirqd currently working on this + task_struct's behalf. only set by the task pointed + to by klitirqd. + + ptr only valid if is_proxy_thread == 0 + */ + struct task_struct* cur_klitirqd; + + /* Used to implement mutual execution exclusion between + * job and klitirqd execution. Job must always hold + * it's klitirqd_sem to execute. klitirqd instance + * must hold the semaphore before executing on behalf + * of a job. + */ + struct mutex klitirqd_sem; + + /* status of held klitirqd_sem, even if the held klitirqd_sem is from + another task (only proxy threads do this though). + */ + atomic_t klitirqd_sem_stat; +#endif + +#ifdef CONFIG_LITMUS_NVIDIA + /* number of top-half interrupts handled on behalf of current job */ + atomic_t nv_int_count; + long unsigned int held_gpus; // bitmap of held GPUs. + +#ifdef CONFIG_LITMUS_AFFINITY_LOCKING + fp_t gpu_fb_param_a[MIG_LAST+1]; + fp_t gpu_fb_param_b[MIG_LAST+1]; + + gpu_migration_dist_t gpu_migration; + int last_gpu; + feedback_est_t gpu_migration_est[MIG_LAST+1]; // local, near, med, far + + lt_t accum_gpu_time; + lt_t gpu_time_stamp; + + unsigned int suspend_gpu_tracker_on_block:1; +#endif +#endif + #ifdef CONFIG_LITMUS_LOCKING /* Is the task being priority-boosted by a locking protocol? */ unsigned int priority_boosted:1; @@ -133,7 +223,15 @@ struct rt_param { * could point to self if PI does not result in * an increased task priority. */ - struct task_struct* inh_task; + struct task_struct* inh_task; + +#ifdef CONFIG_LITMUS_NESTED_LOCKING + raw_spinlock_t hp_blocked_tasks_lock; + struct binheap_handle hp_blocked_tasks; + + /* pointer to lock upon which is currently blocked */ + struct litmus_lock* blocked_lock; +#endif #ifdef CONFIG_NP_SECTION /* For the FMLP under PSN-EDF, it is required to make the task -- cgit v1.2.2 From 077aaecac31331b65442275843932314049a2ceb Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Mon, 20 Aug 2012 17:28:55 -0400 Subject: EDF priority tie-breaks. Instead of tie-breaking by PID (which is a static priority tie-break), we can tie-break by other job-level-unique parameters. This is desirable because tasks are equaly affected by tardiness since static priority tie-breaks cause tasks with greater PID values to experience the most tardiness. There are four tie-break methods: 1) Lateness. If two jobs, J_{1,i} and J_{2,j} of tasks T_1 and T_2, respectively, have equal deadlines, we favor the job of the task that had the worst lateness for jobs J_{1,i-1} and J_{2,j-1}. Note: Unlike tardiness, lateness may be less than zero. This occurs when a job finishes before its deadline. 2) Normalized Lateness. The same as #1, except lateness is first normalized by each task's relative deadline. This prevents tasks with short relative deadlines and small execution requirements from always losing tie-breaks. 3) Hash. The job tuple (PID, Job#) is used to generate a hash. Hash values are then compared. A job has ~50% chance of winning a tie-break with respect to another job. Note: Emperical testing shows that some jobs can have +/- ~1.5% advantage in tie-breaks. Linux's built-in hash function is not totally a uniform hash. 4) PIDs. PID-based tie-break used in prior versions of Litmus. Conflicts: litmus/edf_common.c --- include/litmus/rt_param.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 89ac0dda7d3d..fac939dbd33a 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -110,6 +110,12 @@ struct rt_job { /* How much service has this job received so far? */ lt_t exec_time; + /* By how much did the prior job miss its deadline by? + * Value differs from tardiness in that lateness may + * be negative (when job finishes before its deadline). + */ + long long lateness; + /* Which job is this. This is used to let user space * specify which job to wait for, which is important if jobs * overrun. If we just call sys_sleep_next_period() then we -- cgit v1.2.2 From 6a225701acf7d79f292eeffcd99d6f00b02c180b Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Fri, 7 Sep 2012 23:25:01 -0400 Subject: Infrastructure for Litmus signals. Added signals to Litmus. Specifcally, SIG_BUDGET signals are delivered (when requested by real-time tasks) when a budget is exceeded. Note: pfair not currently supported (but it probably could be). --- include/litmus/rt_param.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 89ac0dda7d3d..637fe6b84f9d 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -30,9 +30,15 @@ typedef enum { typedef enum { NO_ENFORCEMENT, /* job may overrun unhindered */ QUANTUM_ENFORCEMENT, /* budgets are only checked on quantum boundaries */ - PRECISE_ENFORCEMENT /* budgets are enforced with hrtimers */ + PRECISE_ENFORCEMENT, /* budgets are enforced with hrtimers */ } budget_policy_t; +typedef enum { + NO_SIGNALS, /* job receives no signals when it exhausts its budget */ + QUANTUM_SIGNALS, /* budget signals are only sent on quantum boundaries */ + PRECISE_SIGNALS, /* budget signals are triggered with hrtimers */ +} budget_signal_policy_t; + /* We use the common priority interpretation "lower index == higher priority", * which is commonly used in fixed-priority schedulability analysis papers. * So, a numerically lower priority value implies higher scheduling priority, @@ -62,6 +68,7 @@ struct rt_task { unsigned int priority; task_class_t cls; budget_policy_t budget_policy; /* ignored by pfair */ + budget_signal_policy_t budget_signal_policy; /* currently ignored by pfair */ }; union np_flag { @@ -118,8 +125,15 @@ struct rt_job { * Increase this sequence number when a job is released. */ unsigned int job_no; + + /* bits: + * 0th: Set if a budget exhaustion signal has already been sent for + * the current job. */ + unsigned long flags; }; +#define RT_JOB_SIG_BUDGET_SENT 0 + struct pfair_param; /* RT task parameters for scheduling extensions -- cgit v1.2.2 From 193a19c94a32f2e2a0e973f0a98cf4a098cefa15 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Sun, 9 Sep 2012 13:42:13 -0400 Subject: simple average tracking --- include/litmus/rt_param.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 0198884eab86..a441badd30cc 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -144,6 +144,17 @@ typedef struct feedback_est{ fp_t accum_err; } feedback_est_t; + +#define AVG_EST_WINDOW_SIZE 20 + +typedef struct avg_est{ + lt_t history[AVG_EST_WINDOW_SIZE]; + uint16_t count; + uint16_t idx; + lt_t sum; + lt_t avg; +} avg_est_t; + /* RT task parameters for scheduling extensions * These parameters are inherited during clone and therefore must * be explicitly set up before the task set is launched. @@ -190,12 +201,10 @@ struct rt_param { long unsigned int held_gpus; // bitmap of held GPUs. #ifdef CONFIG_LITMUS_AFFINITY_LOCKING - fp_t gpu_fb_param_a[MIG_LAST+1]; - fp_t gpu_fb_param_b[MIG_LAST+1]; + avg_est_t gpu_migration_est[MIG_LAST+1]; gpu_migration_dist_t gpu_migration; int last_gpu; - feedback_est_t gpu_migration_est[MIG_LAST+1]; // local, near, med, far lt_t accum_gpu_time; lt_t gpu_time_stamp; -- cgit v1.2.2 From 901fdd9c22790039a76c1d3ee01828a2f124f6f3 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Mon, 10 Sep 2012 11:27:08 -0400 Subject: standard devation-based gpu affinity predictor --- include/litmus/rt_param.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index a441badd30cc..04239c747f06 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -152,6 +152,7 @@ typedef struct avg_est{ uint16_t count; uint16_t idx; lt_t sum; + lt_t std; lt_t avg; } avg_est_t; -- cgit v1.2.2 From fd3aa01f176cf12b1625f4f46ba01f3340bb57ed Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Tue, 11 Sep 2012 19:36:11 -0400 Subject: blarg --- include/litmus/rt_param.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 89ac0dda7d3d..21430623a940 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -157,6 +157,11 @@ struct rt_param { */ struct task_struct* inh_task; + + struct task_struct* hp_group; + unsigned int is_slave:1; + + #ifdef CONFIG_NP_SECTION /* For the FMLP under PSN-EDF, it is required to make the task * non-preemptive from kernel space. In order not to interfere with -- cgit v1.2.2 From 4ad6ba08f0dab67bbd89a26b27f1cc86e3c45c13 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Fri, 14 Sep 2012 08:34:36 -0400 Subject: checkpoint for aux_tasks. can still deadlock --- include/litmus/rt_param.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 02b750a9570b..2a6c70f1dd37 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -285,9 +285,13 @@ struct rt_param { #endif - struct task_struct* hp_group; - unsigned int is_slave:1; - unsigned int has_slaves:1; +#ifdef CONFIG_LITMUS_LOCKING + unsigned int is_aux_task:1; + unsigned int has_aux_tasks:1; + + struct list_head aux_task_node; + struct binheap_node aux_task_owner_node; +#endif #ifdef CONFIG_NP_SECTION @@ -354,6 +358,13 @@ struct rt_param { struct control_page * ctrl_page; }; +struct aux_data +{ + struct list_head aux_tasks; + struct binheap aux_task_owners; + unsigned int initialized:1; +}; + /* Possible RT flags */ #define RT_F_RUNNING 0x00000000 #define RT_F_SLEEP 0x00000001 -- cgit v1.2.2 From 4e8f9b7c2e9134ca31feb91dee3609a95df6de56 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Sun, 16 Sep 2012 17:44:37 -0400 Subject: Implement real-time aux threads. G-EDF only. --- include/litmus/rt_param.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 2a6c70f1dd37..c45ba23d7650 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -284,11 +284,11 @@ struct rt_param { struct litmus_lock* blocked_lock; #endif - + #ifdef CONFIG_LITMUS_LOCKING unsigned int is_aux_task:1; unsigned int has_aux_tasks:1; - + struct list_head aux_task_node; struct binheap_node aux_task_owner_node; #endif -- cgit v1.2.2 From c58a74c8ad2d2b1b01be12afb9bac58dfef0d16a Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Sun, 16 Sep 2012 18:29:36 -0400 Subject: Added CONFIG_REALTIME_AUX_TASKS option Auxillary task features were enabled by CONFIG_LITMUS_LOCKING. Made auxillary tasks a seperate feature that depends upon CONFIG_LITMUS_LOCKING. --- include/litmus/rt_param.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index c45ba23d7650..8b9e14c461dc 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -285,7 +285,7 @@ struct rt_param { #endif -#ifdef CONFIG_LITMUS_LOCKING +#ifdef CONFIG_REALTIME_AUX_TASKS unsigned int is_aux_task:1; unsigned int has_aux_tasks:1; @@ -358,12 +358,14 @@ struct rt_param { struct control_page * ctrl_page; }; +#ifdef CONFIG_REALTIME_AUX_TASKS struct aux_data { struct list_head aux_tasks; struct binheap aux_task_owners; unsigned int initialized:1; }; +#endif /* Possible RT flags */ #define RT_F_RUNNING 0x00000000 -- cgit v1.2.2 From ba54b1096870fba6e3bbb99aafc713e76b747353 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Mon, 17 Sep 2012 19:31:04 -0400 Subject: Fixed three bugs with aux threads and nested locks Fixes two bugs with nested locks: 1) List of aux threads could become corrupted. -- moved modifications to be within scheduler lock. 2) Fixed bad EDF comparison ordering that could lead to schedule thrashing in an infinite loop. 3) Prevent aux threads from inheriting a priority from a task that is blocked on a real-time litmus lock. (since the aux threads can't possibly hold these locks, we don't have to worry about inheritance.) --- include/litmus/rt_param.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 8b9e14c461dc..44f85a366574 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -288,6 +288,7 @@ struct rt_param { #ifdef CONFIG_REALTIME_AUX_TASKS unsigned int is_aux_task:1; unsigned int has_aux_tasks:1; + unsigned int hide_from_aux_tasks:1; struct list_head aux_task_node; struct binheap_node aux_task_owner_node; -- cgit v1.2.2 From dede6a6b8ce09f48295d8ba4635480c98ef85284 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Sun, 11 Nov 2012 13:10:43 -0500 Subject: improve ikglp heuristics --- include/litmus/rt_param.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 44f85a366574..cb7c3ac64339 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -188,6 +188,8 @@ typedef struct feedback_est{ #define AVG_EST_WINDOW_SIZE 20 +typedef int (*notify_rsrc_exit_t)(struct task_struct* tsk); + typedef struct avg_est{ lt_t history[AVG_EST_WINDOW_SIZE]; uint16_t count; @@ -248,6 +250,9 @@ struct rt_param { gpu_migration_dist_t gpu_migration; int last_gpu; + notify_rsrc_exit_t rsrc_exit_cb; + void* rsrc_exit_cb_args; + lt_t accum_gpu_time; lt_t gpu_time_stamp; -- cgit v1.2.2 From 983773f990053cb0ced72afb4b69594e5d32c779 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Thu, 6 Dec 2012 20:37:20 -0500 Subject: AUX_FUTURE and revised inh-based aux tie break --- include/litmus/rt_param.h | 7 +++++++ 1 file changed, 7 insertions(+) mode change 100644 => 100755 include/litmus/rt_param.h (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h old mode 100644 new mode 100755 index cb7c3ac64339..aca78a835529 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -41,6 +41,12 @@ typedef enum { PRECISE_SIGNALS, /* budget signals are triggered with hrtimers */ } budget_signal_policy_t; +typedef enum { + AUX_ENABLE = 0x1, + AUX_CURRENT = (AUX_ENABLE<<1), + AUX_FUTURE = (AUX_CURRENT<<2) +} aux_flags_t; + /* We use the common priority interpretation "lower index == higher priority", * which is commonly used in fixed-priority schedulability analysis papers. * So, a numerically lower priority value implies higher scheduling priority, @@ -370,6 +376,7 @@ struct aux_data struct list_head aux_tasks; struct binheap aux_task_owners; unsigned int initialized:1; + unsigned int aux_future:1; }; #endif -- cgit v1.2.2 From fbd9574e298157b54c38f82f536e5cea8f766dff Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Sun, 9 Dec 2012 16:53:50 -0500 Subject: Rename klitirqd klmirqd. --- include/litmus/rt_param.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) mode change 100755 => 100644 include/litmus/rt_param.h (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h old mode 100755 new mode 100644 index aca78a835529..47301c04d862 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -166,7 +166,7 @@ struct rt_job { struct pfair_param; -enum klitirqd_sem_status +enum klmirqd_sem_status { NEED_TO_REACQUIRE, REACQUIRING, @@ -223,26 +223,26 @@ struct rt_param { /* proxy threads have minimum priority by default */ unsigned int is_proxy_thread:1; - /* pointer to klitirqd currently working on this + /* pointer to klmirqd currently working on this task_struct's behalf. only set by the task pointed - to by klitirqd. + to by klmirqd. ptr only valid if is_proxy_thread == 0 */ - struct task_struct* cur_klitirqd; + struct task_struct* cur_klmirqd; /* Used to implement mutual execution exclusion between - * job and klitirqd execution. Job must always hold - * it's klitirqd_sem to execute. klitirqd instance + * job and klmirqd execution. Job must always hold + * it's klmirqd_sem to execute. klmirqd instance * must hold the semaphore before executing on behalf * of a job. */ - struct mutex klitirqd_sem; + struct mutex klmirqd_sem; - /* status of held klitirqd_sem, even if the held klitirqd_sem is from + /* status of held klmirqd_sem, even if the held klmirqd_sem is from another task (only proxy threads do this though). */ - atomic_t klitirqd_sem_stat; + atomic_t klmirqd_sem_stat; #endif #ifdef CONFIG_LITMUS_NVIDIA -- cgit v1.2.2 From c8483ef0959672310bf4ebb72e1a308b00543f74 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Tue, 11 Dec 2012 22:01:01 -0500 Subject: make klmirqd work like aux tasks. checkpoint. this code is untested! --- include/litmus/rt_param.h | 70 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 20 deletions(-) (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 47301c04d862..c8ee64569dbb 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -128,6 +128,10 @@ struct control_page { #include #include +#ifdef CONFIG_LITMUS_SOFTIRQD +#include +#endif + struct _rt_domain; struct bheap_node; struct release_heap; @@ -205,6 +209,38 @@ typedef struct avg_est{ lt_t avg; } avg_est_t; + + +#ifdef CONFIG_LITMUS_SOFTIRQD +//struct tasklet_head +//{ +// struct tasklet_struct *head; +// struct tasklet_struct **tail; +//}; + +struct klmirqd_info +{ + struct task_struct* klmirqd; + struct task_struct* current_owner; + unsigned int terminating:1; + + raw_spinlock_t lock; + + u32 pending; + atomic_t num_hi_pending; + atomic_t num_low_pending; + atomic_t num_work_pending; + + /* in order of priority */ + struct tasklet_head pending_tasklets_hi; + struct tasklet_head pending_tasklets; + struct list_head worklist; + + struct list_head klmirqd_reg; +}; +#endif + + /* RT task parameters for scheduling extensions * These parameters are inherited during clone and therefore must * be explicitly set up before the task set is launched. @@ -221,34 +257,21 @@ struct rt_param { #ifdef CONFIG_LITMUS_SOFTIRQD /* proxy threads have minimum priority by default */ - unsigned int is_proxy_thread:1; - - /* pointer to klmirqd currently working on this - task_struct's behalf. only set by the task pointed - to by klmirqd. + unsigned int is_interrupt_thread:1; - ptr only valid if is_proxy_thread == 0 - */ - struct task_struct* cur_klmirqd; - - /* Used to implement mutual execution exclusion between - * job and klmirqd execution. Job must always hold - * it's klmirqd_sem to execute. klmirqd instance - * must hold the semaphore before executing on behalf - * of a job. - */ - struct mutex klmirqd_sem; - - /* status of held klmirqd_sem, even if the held klmirqd_sem is from - another task (only proxy threads do this though). + /* pointer to data used by klmirqd thread. + * + * ptr only valid if is_interrupt_thread == 1 */ - atomic_t klmirqd_sem_stat; + struct klmirqd_info* klmirqd_info; #endif #ifdef CONFIG_LITMUS_NVIDIA /* number of top-half interrupts handled on behalf of current job */ atomic_t nv_int_count; long unsigned int held_gpus; // bitmap of held GPUs. + struct binheap_node gpu_owner_node; // just one GPU for now... + unsigned int hide_from_gpu:1; #ifdef CONFIG_LITMUS_AFFINITY_LOCKING avg_est_t gpu_migration_est[MIG_LAST+1]; @@ -370,6 +393,13 @@ struct rt_param { struct control_page * ctrl_page; }; +//#ifdef CONFIG_LITMUS_SOFTIRQD +//struct klmirqd_data +//{ +// struct binheap klmirqd_users; +//}; +//#endif + #ifdef CONFIG_REALTIME_AUX_TASKS struct aux_data { -- cgit v1.2.2 From 1235a665a5e00dc762e6646c01381b3ed5019d86 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Wed, 9 Jan 2013 17:00:54 -0500 Subject: Enable sched_trace log injection from userspace --- include/litmus/rt_param.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'include/litmus/rt_param.h') diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index c8ee64569dbb..43daaf84101d 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -47,6 +47,28 @@ typedef enum { AUX_FUTURE = (AUX_CURRENT<<2) } aux_flags_t; +/* mirror of st_event_record_type_t + * Assume all are UNsupported, unless otherwise stated. */ +typedef enum { + ST_INJECT_NAME = 1, /* supported */ + ST_INJECT_PARAM, /* supported */ + ST_INJECT_RELEASE, /* supported */ + ST_INJECT_ASSIGNED, + ST_INJECT_SWITCH_TO, + ST_INJECT_SWITCH_AWAY, + ST_INJECT_COMPLETION, /* supported */ + ST_INJECT_BLOCK, + ST_INJECT_RESUME, + ST_INJECT_ACTION, + ST_INJECT_SYS_RELEASE, /* supported */ +} sched_trace_injection_events_t; + +struct st_inject_args { + lt_t release; + lt_t deadline; + unsigned int job_no; +}; + /* We use the common priority interpretation "lower index == higher priority", * which is commonly used in fixed-priority schedulability analysis papers. * So, a numerically lower priority value implies higher scheduling priority, -- cgit v1.2.2