aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/gpu_affinity.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus/gpu_affinity.h')
-rw-r--r--include/litmus/gpu_affinity.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/litmus/gpu_affinity.h b/include/litmus/gpu_affinity.h
index 6b3fb8b28745..d64a15cbf2a5 100644
--- a/include/litmus/gpu_affinity.h
+++ b/include/litmus/gpu_affinity.h
@@ -31,17 +31,18 @@ static inline lt_t get_gpu_time(struct task_struct* t)
31 31
32static inline lt_t get_gpu_estimate(struct task_struct* t, gpu_migration_dist_t dist) 32static inline lt_t get_gpu_estimate(struct task_struct* t, gpu_migration_dist_t dist)
33{ 33{
34 int i; 34// int i;
35 fpbuf_t temp = _fp_to_integer(t->rt_param.gpu_migration_est[dist].est); 35// fpbuf_t temp = _fp_to_integer(t->rt_param.gpu_migration_est[dist].est);
36 lt_t val = (temp >= 0) ? temp : 0; // never allow negative estimates... 36// lt_t val = (temp >= 0) ? temp : 0; // never allow negative estimates...
37 lt_t val = t->rt_param.gpu_migration_est[dist].avg;
37 38
38 WARN_ON(temp < 0); 39// WARN_ON(temp < 0);
39 40
40 // lower-bound a distant migration to be at least equal to the level 41 // lower-bound a distant migration to be at least equal to the level
41 // below it. 42 // below it.
42 for(i = dist-1; (val == 0) && (i >= MIG_LOCAL); --i) { 43// for(i = dist-1; (val == 0) && (i >= MIG_LOCAL); --i) {
43 val = _fp_to_integer(t->rt_param.gpu_migration_est[i].est); 44// val = _fp_to_integer(t->rt_param.gpu_migration_est[i].est);
44 } 45// }
45 46
46 return ((val > 0) ? val : dist+1); 47 return ((val > 0) ? val : dist+1);
47} 48}