Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[DVFS] Add/change debug statements for dvfs governors
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 7 Feb 2018 13:07:01 +0000 (14:07 +0100)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Tue, 13 Feb 2018 18:53:16 +0000 (19:53 +0100)
src/surf/plugins/host_dvfs.cpp

index d7cd83f..03b818f 100644 (file)
@@ -97,8 +97,7 @@ public:
       int new_pstate = max_pstate - load * max_pstate;
       host->setPstate(new_pstate);
 
       int new_pstate = max_pstate - load * max_pstate;
       host->setPstate(new_pstate);
 
-      host->setPstate(max_pstate - load * max_pstate);
-      XBT_INFO("Changed to pstate %f -- check: %i", max_pstate - load * max_pstate, host->getPstate());
+      XBT_DEBUG("Load: %f --> changed to pstate %i", load*host->getCoreCount(), new_pstate);
     }
   }
 };
     }
   }
 };
@@ -118,10 +117,10 @@ public:
     if (load > freq_up_threshold) {
       if (pstate != 0) {
         host->setPstate(pstate - 1);
     if (load > freq_up_threshold) {
       if (pstate != 0) {
         host->setPstate(pstate - 1);
-        XBT_INFO("Increasing performance to pstate %d", pstate - 1);
+        XBT_INFO("Load: %f > threshold: %f -> increasing performance to pstate %d", load, freq_up_threshold, pstate - 1);
       }
       else {
       }
       else {
-        XBT_DEBUG("Cannot speed up even more, already in slowest pstate %d", pstate);
+        XBT_DEBUG("Load: %f > threshold: %f -> but cannot speed up even more, already in highest pstate %d", load, freq_up_threshold, pstate);
       }
     }
 
       }
     }
 
@@ -129,10 +128,10 @@ public:
       int max_pstate = host->getPstatesCount() - 1;
       if (pstate != max_pstate) { // Are we in the slowest pstate already?
         host->setPstate(pstate + 1);
       int max_pstate = host->getPstatesCount() - 1;
       if (pstate != max_pstate) { // Are we in the slowest pstate already?
         host->setPstate(pstate + 1);
-        XBT_INFO("Slowing down to pstate %d", pstate + 1);
+        XBT_INFO("Load: %f < threshold: %f -> slowing down to pstate %d", load, freq_down_threshold, pstate + 1);
       }
       else {
       }
       else {
-        XBT_DEBUG("Cannot slow down even more, already in slowest pstate %d", pstate);
+        XBT_DEBUG("Load: %f < threshold: %f -> cannot slow down even more, already in slowest pstate %d", load, freq_down_threshold, pstate);
       }
     }
   }
       }
     }
   }