diff options
author | ztong <ztong@cs.unc.edu> | 2021-02-09 16:43:52 -0500 |
---|---|---|
committer | ztong <ztong@cs.unc.edu> | 2021-02-09 16:43:52 -0500 |
commit | 8dd0d6050242296733e27b4524d89dd3dc84b3fe (patch) | |
tree | 4e5df1bfe7c524e0d4b50bb0e994211d4295db43 | |
parent | dca1ffeca10875a8516b80c8e78ebd47d92c855f (diff) |
Added support for CPU pinning in EXT-RES
-rw-r--r-- | bin/rt_launch.c | 12 | ||||
-rw-r--r-- | src/litmus.c | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/bin/rt_launch.c b/bin/rt_launch.c index 384ea64..77dbc31 100644 --- a/bin/rt_launch.c +++ b/bin/rt_launch.c | |||
@@ -155,12 +155,12 @@ int main(int argc, char** argv) | |||
155 | param.cls = class; | 155 | param.cls = class; |
156 | param.budget_policy = (want_enforcement) ? | 156 | param.budget_policy = (want_enforcement) ? |
157 | PRECISE_ENFORCEMENT : NO_ENFORCEMENT; | 157 | PRECISE_ENFORCEMENT : NO_ENFORCEMENT; |
158 | if (migrate) { | 158 | |
159 | if (reservation >= 0) | 159 | if (reservation >= 0) |
160 | param.cpu = reservation; | 160 | param.cpu = reservation; |
161 | else | 161 | else if (migrate) |
162 | param.cpu = domain_to_first_cpu(cluster); | 162 | param.cpu = domain_to_first_cpu(cluster); |
163 | } | 163 | |
164 | ret = set_rt_task_param(gettid(), ¶m); | 164 | ret = set_rt_task_param(gettid(), ¶m); |
165 | if (ret < 0) | 165 | if (ret < 0) |
166 | bail_out("could not setup rt task params"); | 166 | bail_out("could not setup rt task params"); |
diff --git a/src/litmus.c b/src/litmus.c index 4d9e986..8ddc3d9 100644 --- a/src/litmus.c +++ b/src/litmus.c | |||
@@ -89,6 +89,7 @@ void init_rt_task_param(struct rt_task* tp) | |||
89 | * - fixed priority = LITMUS_LOWEST_PRIORITY | 89 | * - fixed priority = LITMUS_LOWEST_PRIORITY |
90 | * - release policy = TASK_SPORADIC | 90 | * - release policy = TASK_SPORADIC |
91 | * - cpu assignment = 0 | 91 | * - cpu assignment = 0 |
92 | * - pinned cpu = NO_CPU(-1) | ||
92 | * | 93 | * |
93 | * User must still set the following fields to non-zero values: | 94 | * User must still set the following fields to non-zero values: |
94 | * - tp->exec_cost | 95 | * - tp->exec_cost |
@@ -105,6 +106,7 @@ void init_rt_task_param(struct rt_task* tp) | |||
105 | tp->priority = LITMUS_LOWEST_PRIORITY; | 106 | tp->priority = LITMUS_LOWEST_PRIORITY; |
106 | tp->budget_policy = NO_ENFORCEMENT; | 107 | tp->budget_policy = NO_ENFORCEMENT; |
107 | tp->release_policy = TASK_SPORADIC; | 108 | tp->release_policy = TASK_SPORADIC; |
109 | tp->pinned_cpu = -1; | ||
108 | } | 110 | } |
109 | 111 | ||
110 | task_class_t str2class(const char* str) | 112 | task_class_t str2class(const char* str) |