aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/nvidia_info.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-12-11 22:01:01 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-12-12 14:14:41 -0500
commitc8483ef0959672310bf4ebb72e1a308b00543f74 (patch)
tree9cb306009b01c5226178f69172738026431d37f2 /include/litmus/nvidia_info.h
parentfbd9574e298157b54c38f82f536e5cea8f766dff (diff)
make klmirqd work like aux tasks. checkpoint.
this code is untested!
Diffstat (limited to 'include/litmus/nvidia_info.h')
-rw-r--r--include/litmus/nvidia_info.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/include/litmus/nvidia_info.h b/include/litmus/nvidia_info.h
index 97c9577141db..6f354c8b00ac 100644
--- a/include/litmus/nvidia_info.h
+++ b/include/litmus/nvidia_info.h
@@ -6,10 +6,9 @@
6 6
7#include <litmus/litmus_softirq.h> 7#include <litmus/litmus_softirq.h>
8 8
9
10//#define NV_DEVICE_NUM NR_LITMUS_SOFTIRQD
11#define NV_DEVICE_NUM CONFIG_NV_DEVICE_NUM 9#define NV_DEVICE_NUM CONFIG_NV_DEVICE_NUM
12#define NV_MAX_SIMULT_USERS CONFIG_NV_MAX_SIMULT_USERS 10
11/* Functions used for decoding NVIDIA blobs. */
13 12
14int init_nvidia_info(void); 13int init_nvidia_info(void);
15void shutdown_nvidia_info(void); 14void shutdown_nvidia_info(void);
@@ -18,29 +17,33 @@ int is_nvidia_func(void* func_addr);
18 17
19void dump_nvidia_info(const struct tasklet_struct *t); 18void dump_nvidia_info(const struct tasklet_struct *t);
20 19
21
22// Returns the Nvidia device # associated with provided tasklet and work_struct. 20// Returns the Nvidia device # associated with provided tasklet and work_struct.
23u32 get_tasklet_nv_device_num(const struct tasklet_struct *t); 21u32 get_tasklet_nv_device_num(const struct tasklet_struct *t);
24u32 get_work_nv_device_num(const struct work_struct *t); 22u32 get_work_nv_device_num(const struct work_struct *t);
25 23
26 24
27int init_nv_device_reg(void);
28//int get_nv_device_id(struct task_struct* owner);
29 25
30 26/* Functions for figuring out the priority of GPU-using tasks */
31int reg_nv_device(int reg_device_id, int register_device, struct task_struct *t);
32 27
33struct task_struct* get_nv_max_device_owner(u32 target_device_id); 28struct task_struct* get_nv_max_device_owner(u32 target_device_id);
34//int is_nv_device_owner(u32 target_device_id);
35
36void lock_nv_registry(u32 reg_device_id, unsigned long* flags);
37void unlock_nv_registry(u32 reg_device_id, unsigned long* flags);
38 29
39#ifdef CONFIG_LITMUS_PAI_SOFTIRQD 30#ifdef CONFIG_LITMUS_SOFTIRQD
40void pai_check_priority_increase(struct task_struct *t, int reg_device_id); 31struct task_struct* get_nv_klmirqd_thread(u32 target_device_id);
41void pai_check_priority_decrease(struct task_struct *t, int reg_device_id);
42#endif 32#endif
43 33
44//void increment_nv_int_count(u32 device); 34/* call when the GPU-holding task, t, blocks */
35long enable_gpu_owner(struct task_struct *t);
36
37/* call when the GPU-holding task, t, resumes */
38long disable_gpu_owner(struct task_struct *t);
39
40/* call when the GPU-holding task, t, increases its priority */
41int gpu_owner_increase_priority(struct task_struct *t);
42
43/* call when the GPU-holding task, t, decreases its priority */
44int gpu_owner_decrease_priority(struct task_struct *t);
45
46
47int reg_nv_device(int reg_device_id, int reg_action, struct task_struct *t);
45 48
46#endif 49#endif