diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2013-02-20 09:57:24 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2013-02-20 09:57:24 -0500 |
commit | 6da7825f25093758981c1436f6956569662f72b1 (patch) | |
tree | 5974866a3e36cef11968f7fd9ca8e4f9f4fcb989 | |
parent | e9b88341eb6b9fbe16139796f2f78e1f65793e5a (diff) |
Support CUDA 4.2
-rw-r--r-- | litmus/Kconfig | 8 | ||||
-rw-r--r-- | litmus/nvidia_info.c | 18 |
2 files changed, 20 insertions, 6 deletions
diff --git a/litmus/Kconfig b/litmus/Kconfig index 8dd3955f671d..4bd371d20a1a 100644 --- a/litmus/Kconfig +++ b/litmus/Kconfig | |||
@@ -515,11 +515,17 @@ config CUDA_5_0 | |||
515 | help | 515 | help |
516 | Support CUDA 5.0 (dev. driver version: x86_64-304.54) | 516 | Support CUDA 5.0 (dev. driver version: x86_64-304.54) |
517 | 517 | ||
518 | config CUDA_4_2 | ||
519 | bool "CUDA 4.2" | ||
520 | depends on LITMUS_NVIDIA | ||
521 | help | ||
522 | Support CUDA 4.2 (dev driver version: x86_64-295.40) | ||
523 | |||
518 | config CUDA_4_0 | 524 | config CUDA_4_0 |
519 | bool "CUDA 4.0" | 525 | bool "CUDA 4.0" |
520 | depends on LITMUS_NVIDIA | 526 | depends on LITMUS_NVIDIA |
521 | help | 527 | help |
522 | Support CUDA 4.0 RC2 (dev. driver version: x86_64-270.40) | 528 | Support CUDA 4.0 (dev. driver version: x86_64-270.41) |
523 | 529 | ||
524 | config CUDA_3_2 | 530 | config CUDA_3_2 |
525 | bool "CUDA 3.2" | 531 | bool "CUDA 3.2" |
diff --git a/litmus/nvidia_info.c b/litmus/nvidia_info.c index 7f1dc18624e1..1255d8d6152e 100644 --- a/litmus/nvidia_info.c +++ b/litmus/nvidia_info.c | |||
@@ -35,7 +35,7 @@ typedef union | |||
35 | typedef struct | 35 | typedef struct |
36 | { | 36 | { |
37 | NvU64 address; | 37 | NvU64 address; |
38 | #if defined(CONFIG_CUDA_5_0) || defined(CONFIG_CUDA_5_X) | 38 | #if defined(CONFIG_CUDA_4_2) || defined(CONFIG_CUDA_5_0) || defined(CONFIG_CUDA_5_X) |
39 | NvU64 strapped_size; | 39 | NvU64 strapped_size; |
40 | #endif | 40 | #endif |
41 | NvU64 size; | 41 | NvU64 size; |
@@ -626,7 +626,7 @@ typedef enum { | |||
626 | static struct task_struct* __get_klm_thread(nv_device_registry_t* reg, nvklmtype_t type) | 626 | static struct task_struct* __get_klm_thread(nv_device_registry_t* reg, nvklmtype_t type) |
627 | { | 627 | { |
628 | struct task_struct *klmirqd = NULL; | 628 | struct task_struct *klmirqd = NULL; |
629 | 629 | ||
630 | switch(type) | 630 | switch(type) |
631 | { | 631 | { |
632 | case INTERRUPT_TH: | 632 | case INTERRUPT_TH: |
@@ -731,10 +731,12 @@ static int gpu_klmirqd_increase_priority(struct task_struct *klmirqd, struct tas | |||
731 | { | 731 | { |
732 | int retval = 0; | 732 | int retval = 0; |
733 | 733 | ||
734 | /* | ||
734 | TRACE_CUR("Increasing priority of %s/%d to %s/%d.\n", | 735 | TRACE_CUR("Increasing priority of %s/%d to %s/%d.\n", |
735 | klmirqd->comm, klmirqd->pid, | 736 | klmirqd->comm, klmirqd->pid, |
736 | (hp) ? hp->comm : "null", | 737 | (hp) ? hp->comm : "null", |
737 | (hp) ? hp->pid : 0); | 738 | (hp) ? hp->pid : 0); |
739 | */ | ||
738 | 740 | ||
739 | /* the klmirqd thread should never attempt to hold a litmus-level real-time | 741 | /* the klmirqd thread should never attempt to hold a litmus-level real-time |
740 | * so nested support is not required */ | 742 | * so nested support is not required */ |
@@ -747,10 +749,12 @@ static int gpu_klmirqd_decrease_priority(struct task_struct *klmirqd, struct tas | |||
747 | { | 749 | { |
748 | int retval = 0; | 750 | int retval = 0; |
749 | 751 | ||
752 | /* | ||
750 | TRACE_CUR("Decreasing priority of %s/%d to %s/%d.\n", | 753 | TRACE_CUR("Decreasing priority of %s/%d to %s/%d.\n", |
751 | klmirqd->comm, klmirqd->pid, | 754 | klmirqd->comm, klmirqd->pid, |
752 | (hp) ? hp->comm : "null", | 755 | (hp) ? hp->comm : "null", |
753 | (hp) ? hp->pid : 0); | 756 | (hp) ? hp->pid : 0); |
757 | */ | ||
754 | 758 | ||
755 | /* the klmirqd thread should never attempt to hold a litmus-level real-time | 759 | /* the klmirqd thread should never attempt to hold a litmus-level real-time |
756 | * so nested support is not required */ | 760 | * so nested support is not required */ |
@@ -775,7 +779,7 @@ long enable_gpu_owner(struct task_struct *t) | |||
775 | #endif | 779 | #endif |
776 | 780 | ||
777 | if (!tsk_rt(t)->held_gpus) { | 781 | if (!tsk_rt(t)->held_gpus) { |
778 | TRACE_CUR("task %s/%d does not hold any GPUs\n", t->comm, t->pid); | 782 | // TRACE_CUR("task %s/%d does not hold any GPUs\n", t->comm, t->pid); |
779 | return -1; | 783 | return -1; |
780 | } | 784 | } |
781 | 785 | ||
@@ -803,10 +807,12 @@ long enable_gpu_owner(struct task_struct *t) | |||
803 | int interrupt_success; | 807 | int interrupt_success; |
804 | 808 | ||
805 | /* we're the new hp */ | 809 | /* we're the new hp */ |
810 | /* | ||
806 | TRACE_CUR("%s/%d (eff_prio = %s/%d) is new hp on GPU %d.\n", | 811 | TRACE_CUR("%s/%d (eff_prio = %s/%d) is new hp on GPU %d.\n", |
807 | t->comm, t->pid, | 812 | t->comm, t->pid, |
808 | effective_priority(t)->comm, effective_priority(t)->pid, | 813 | effective_priority(t)->comm, effective_priority(t)->pid, |
809 | gpu); | 814 | gpu); |
815 | */ | ||
810 | 816 | ||
811 | interrupt_success = gpu_klmirqd_increase_priority(reg->interrupt_thread, effective_priority(t)); | 817 | interrupt_success = gpu_klmirqd_increase_priority(reg->interrupt_thread, effective_priority(t)); |
812 | 818 | ||
@@ -850,11 +856,11 @@ long disable_gpu_owner(struct task_struct *t) | |||
850 | gpu = find_first_bit(&tsk_rt(t)->held_gpus, sizeof(tsk_rt(t)->held_gpus)); | 856 | gpu = find_first_bit(&tsk_rt(t)->held_gpus, sizeof(tsk_rt(t)->held_gpus)); |
851 | 857 | ||
852 | if (!binheap_is_in_heap(&tsk_rt(t)->gpu_owner_node)) { | 858 | if (!binheap_is_in_heap(&tsk_rt(t)->gpu_owner_node)) { |
853 | TRACE_CUR("task %s/%d is not active on GPU %d\n", t->comm, t->pid, gpu); | 859 | // TRACE_CUR("task %s/%d is not active on GPU %d\n", t->comm, t->pid, gpu); |
854 | goto out; | 860 | goto out; |
855 | } | 861 | } |
856 | 862 | ||
857 | TRACE_CUR("task %s/%d exiting from GPU %d.\n", t->comm, t->pid, gpu); | 863 | // TRACE_CUR("task %s/%d exiting from GPU %d.\n", t->comm, t->pid, gpu); |
858 | 864 | ||
859 | 865 | ||
860 | reg = &NV_DEVICE_REG[gpu]; | 866 | reg = &NV_DEVICE_REG[gpu]; |
@@ -877,6 +883,7 @@ long disable_gpu_owner(struct task_struct *t) | |||
877 | #endif | 883 | #endif |
878 | struct task_struct *to_inh = (new_hp) ? effective_priority(new_hp) : NULL; | 884 | struct task_struct *to_inh = (new_hp) ? effective_priority(new_hp) : NULL; |
879 | 885 | ||
886 | /* | ||
880 | TRACE_CUR("%s/%d is no longer hp on GPU %d; new hp = %s/%d (eff_prio = %s/%d).\n", | 887 | TRACE_CUR("%s/%d is no longer hp on GPU %d; new hp = %s/%d (eff_prio = %s/%d).\n", |
881 | t->comm, t->pid, | 888 | t->comm, t->pid, |
882 | gpu, | 889 | gpu, |
@@ -884,6 +891,7 @@ long disable_gpu_owner(struct task_struct *t) | |||
884 | (new_hp) ? new_hp->pid : 0, | 891 | (new_hp) ? new_hp->pid : 0, |
885 | (to_inh) ? to_inh->comm : "null", | 892 | (to_inh) ? to_inh->comm : "null", |
886 | (to_inh) ? to_inh->pid : 0); | 893 | (to_inh) ? to_inh->pid : 0); |
894 | */ | ||
887 | 895 | ||
888 | interrupt_success = gpu_klmirqd_decrease_priority(reg->interrupt_thread, to_inh); | 896 | interrupt_success = gpu_klmirqd_decrease_priority(reg->interrupt_thread, to_inh); |
889 | 897 | ||