aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2013-02-06 20:30:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2013-02-06 20:30:13 -0500
commit9aacc135e0abe206b7d778af937babaaa7f3c199 (patch)
treeeaab1b47ff8b90cc5f733b6a345878fd1ba03f27 /include/litmus
parentdd4c9d77928d67e3afa916b6f1a14e20f02ee67f (diff)
re-enable klmirqd for workqueues, and grace reboot
Diffstat (limited to 'include/litmus')
-rw-r--r--include/litmus/litmus_softirq.h17
-rw-r--r--include/litmus/nvidia_info.h10
-rw-r--r--include/litmus/sched_trace.h7
3 files changed, 28 insertions, 6 deletions
diff --git a/include/litmus/litmus_softirq.h b/include/litmus/litmus_softirq.h
index cfef08187464..e9590835dc19 100644
--- a/include/litmus/litmus_softirq.h
+++ b/include/litmus/litmus_softirq.h
@@ -153,14 +153,27 @@ static inline int _litmus_tasklet_hi_schedule_first(
153////////////// 153//////////////
154 154
155extern int __litmus_schedule_work( 155extern int __litmus_schedule_work(
156 struct work_struct* w, 156 struct work_struct *w,
157 struct task_struct *klmirqd_thread); 157 struct task_struct *klmirqd_thread);
158 158
159static inline int litmus_schedule_work( 159static inline int litmus_schedule_work(
160 struct work_struct* w, 160 struct work_struct *w,
161 struct task_struct *klmirqd_thread)
162{
163 int ret = 0;
164 if (!test_and_set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(w))) {
165 ret = __litmus_schedule_work(w, klmirqd_thread);
166 }
167 return(ret);
168}
169
170static inline int _litmus_schedule_work(
171 struct work_struct *w,
161 struct task_struct *klmirqd_thread) 172 struct task_struct *klmirqd_thread)
162{ 173{
163 return(__litmus_schedule_work(w, klmirqd_thread)); 174 return(__litmus_schedule_work(w, klmirqd_thread));
164} 175}
165 176
177
178
166#endif 179#endif
diff --git a/include/litmus/nvidia_info.h b/include/litmus/nvidia_info.h
index 0ebe9c10c6a2..7db4a32af734 100644
--- a/include/litmus/nvidia_info.h
+++ b/include/litmus/nvidia_info.h
@@ -28,7 +28,15 @@ u32 get_work_nv_device_num(const struct work_struct *t);
28struct task_struct* get_nv_max_device_owner(u32 target_device_id); 28struct task_struct* get_nv_max_device_owner(u32 target_device_id);
29 29
30#ifdef CONFIG_LITMUS_SOFTIRQD 30#ifdef CONFIG_LITMUS_SOFTIRQD
31struct task_struct* get_nv_klmirqd_thread(u32 target_device_id); 31struct task_struct* get_and_lock_nvklmirqd_thread(u32 target_device_id, unsigned long* flags);
32void unlock_nvklmirqd_thread(u32 target_device_id, unsigned long* flags);
33struct task_struct* get_nvklmirqd_thread(u32 target_device_id);
34
35#if defined(CONFIG_LITMUS_NVIDIA_WORKQ_ON) || defined(CONFIG_LITMUS_NVIDIA_WORKQ_ON_DEDICATED)
36struct task_struct* get_and_lock_nvklmworkqd_thread(u32 target_device_id, unsigned long* flags);
37void unlock_nvklmworkqd_thread(u32 target_device_id, unsigned long* flags);
38struct task_struct* get_nvklmworkqd_thread(u32 target_device_id);
39#endif
32#endif 40#endif
33 41
34/* call when the GPU-holding task, t, blocks */ 42/* call when the GPU-holding task, t, blocks */
diff --git a/include/litmus/sched_trace.h b/include/litmus/sched_trace.h
index 2598cdf6088e..0d22c275dd72 100644
--- a/include/litmus/sched_trace.h
+++ b/include/litmus/sched_trace.h
@@ -103,7 +103,8 @@ struct st_tasklet_end_data {
103 103
104struct st_work_release_data { 104struct st_work_release_data {
105 u64 when; 105 u64 when;
106 u64 __unused; 106 u32 device;
107 u32 __unused;
107} __attribute__((packed)); 108} __attribute__((packed));
108 109
109struct st_work_begin_data { 110struct st_work_begin_data {
@@ -408,8 +409,8 @@ feather_callback void do_sched_trace_migration(unsigned long id,
408 SCHED_TRACE2(SCHED_TRACE_BASE_ID + 13, do_sched_trace_tasklet_end, t, flushed) 409 SCHED_TRACE2(SCHED_TRACE_BASE_ID + 13, do_sched_trace_tasklet_end, t, flushed)
409 410
410 411
411#define sched_trace_work_release(t) \ 412#define sched_trace_work_release(t, d) \
412 SCHED_TRACE(SCHED_TRACE_BASE_ID + 14, do_sched_trace_work_release, t) 413 SCHED_TRACE2(SCHED_TRACE_BASE_ID + 14, do_sched_trace_work_release, t, d)
413 414
414#define sched_trace_work_begin(t, e) \ 415#define sched_trace_work_begin(t, e) \
415 SCHED_TRACE2(SCHED_TRACE_BASE_ID + 15, do_sched_trace_work_begin, t, e) 416 SCHED_TRACE2(SCHED_TRACE_BASE_ID + 15, do_sched_trace_work_begin, t, e)