diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-10-02 05:54:19 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-02-12 06:49:39 -0500 |
commit | 9674c4edf23e3f43f7c07ba219f2c8540f1813d7 (patch) | |
tree | d38077985fc80483cb4f5d2ffbf9fb19add99f93 | |
parent | 83e450ee441a4edea9b8665756950d647dbddadf (diff) |
MPCP: export gcs response-time bounds
This will be used by the new LP-based MPCP analysis.
Also, report local blocking to Python and add a clarifying comment.
-rw-r--r-- | native/include/mpcp.h | 11 | ||||
-rw-r--r-- | native/src/blocking/mpcp.cpp | 20 |
2 files changed, 23 insertions, 8 deletions
diff --git a/native/include/mpcp.h b/native/include/mpcp.h new file mode 100644 index 0000000..75f77b1 --- /dev/null +++ b/native/include/mpcp.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #ifndef _MPCP_H_ | ||
2 | #define _MPCP_H_ | ||
3 | |||
4 | typedef std::vector<unsigned long> ResponseTimes; | ||
5 | typedef std::vector<ResponseTimes> TaskResponseTimes; | ||
6 | typedef std::vector<TaskResponseTimes> ClusterResponseTimes; | ||
7 | |||
8 | void determine_gcs_response_times(const Clusters& clusters, | ||
9 | const PriorityCeilings& ceilings, | ||
10 | ClusterResponseTimes& times); | ||
11 | #endif | ||
diff --git a/native/src/blocking/mpcp.cpp b/native/src/blocking/mpcp.cpp index d210595..67d62ac 100644 --- a/native/src/blocking/mpcp.cpp +++ b/native/src/blocking/mpcp.cpp | |||
@@ -4,12 +4,9 @@ | |||
4 | #include "stl-helper.h" | 4 | #include "stl-helper.h" |
5 | #include "math-helper.h" | 5 | #include "math-helper.h" |
6 | 6 | ||
7 | // *************************** MPCP ****************************************** | 7 | # include "mpcp.h" |
8 | |||
9 | 8 | ||
10 | typedef std::vector<unsigned long> ResponseTimes; | 9 | // *************************** MPCP ****************************************** |
11 | typedef std::vector<ResponseTimes> TaskResponseTimes; | ||
12 | typedef std::vector<TaskResponseTimes> ClusterResponseTimes; | ||
13 | 10 | ||
14 | static unsigned long get_max_gcs_length(const TaskInfo* tsk, | 11 | static unsigned long get_max_gcs_length(const TaskInfo* tsk, |
15 | const PriorityCeilings& ceilings, | 12 | const PriorityCeilings& ceilings, |
@@ -69,9 +66,9 @@ static void determine_gcs_response_times(const Cluster& cluster, | |||
69 | } | 66 | } |
70 | } | 67 | } |
71 | 68 | ||
72 | static void determine_gcs_response_times(const Clusters& clusters, | 69 | void determine_gcs_response_times(const Clusters& clusters, |
73 | const PriorityCeilings& ceilings, | 70 | const PriorityCeilings& ceilings, |
74 | ClusterResponseTimes& times) | 71 | ClusterResponseTimes& times) |
75 | { | 72 | { |
76 | times.reserve(clusters.size()); | 73 | times.reserve(clusters.size()); |
77 | foreach(clusters, it) | 74 | foreach(clusters, it) |
@@ -160,6 +157,11 @@ static unsigned long mpcp_remote_blocking(unsigned int res_id, | |||
160 | 157 | ||
161 | for (i = 0; i < clusters.size(); i++) | 158 | for (i = 0; i < clusters.size(); i++) |
162 | { | 159 | { |
160 | // Note that this also includes the local cluster. | ||
161 | // This is indeed correct (and matches LNR:09): we | ||
162 | // are interested in computing the *response time*, | ||
163 | // which is also affected by local higher-priority tasks. | ||
164 | // The response-time is used as a bound on blocking. | ||
163 | blocking += mpcp_remote_blocking(res_id, interval, | 165 | blocking += mpcp_remote_blocking(res_id, interval, |
164 | tsk, clusters[i], times[i], | 166 | tsk, clusters[i], times[i], |
165 | max_lower); | 167 | max_lower); |
@@ -289,6 +291,8 @@ BlockingBounds* mpcp_bounds(const ResourceSharingInfo& info, | |||
289 | Interference inf; | 291 | Interference inf; |
290 | inf.total_length = remote; | 292 | inf.total_length = remote; |
291 | results.set_remote_blocking(i, inf); | 293 | results.set_remote_blocking(i, inf); |
294 | inf.total_length = local; | ||
295 | results.set_local_blocking(i, inf); | ||
292 | } | 296 | } |
293 | 297 | ||
294 | return _results; | 298 | return _results; |